joenano
joenano
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
Followed your advice and it worked, no more warning, and no rerenders. Thanks
13 replies
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
ah thats cool, will spend some time reworking it today then
13 replies
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
im not understanding why there wouldn't be a rerender tho, doesn't the for loop rerun every time tabs() triggers? what I have current is this, so when it triggers there is no recreation of the content component:
<For each={tabs()}>{(item) => item.content}</For>
<For each={tabs()}>{(item) => item.content}</For>
13 replies
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
actually going to be a bit of a pain to change as different content in the first two tabs
13 replies
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
ill give it a try just now
13 replies
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
wouldnt that rerender every time a new tab is added tho? the point is to avoid rerendeing as there is a lot of data in each tab
13 replies
SSolidJS
Created by joenano on 11/21/2023 in #support
Computations created outside a render will never be disposed.
I know thats where the warning is coming from, but was hoping it could be ignored as im keeping track of them
13 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
it will rerender when the media signal in its props changes
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
You'll want to move your data fetching into the media list component so you dont have to rerender it every time.
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
none of the other files are loading so I cant see whats going on, but if the data is changing outside mediaList, and medialist is rerendering on a signal, then it wont work because you rerunning that component every time and creating the list of cards every time
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
looks like your passing in a media prop that doesnt ever change inside the component
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
where does the data change
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
then inside the index yous use {mediaCard} instead of <MediaCard ... />
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
with a signal and createeffect
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
i ran into this problem a few times
61 replies
SSolidJS
Created by crowned on 10/30/2023 in #support
How to allow updating of elements instead of destroying and rendering the elements?
You need to create the cards outside the index/for, at the top level of the component for example, then they wont be rerenderd in the index/for loop
61 replies