jon vuri
jon vuri
SSolidJS
Created by jon vuri on 11/17/2023 in #support
How to properly memoize children?
I initially tried using a store, thinking that because it would be different signals for each property, it would work as expected, but then I ran into that 'boundary' (because the store object itself was not changing reference)
5 replies
SSolidJS
Created by jon vuri on 11/17/2023 in #support
How to properly memoize children?
One other difficulty I mentioned here that might already be obvious from my example, but I'm not exactly sure how to do said splitting of the signals - I've already experimented with that some, and the wall I'm hitting is how to cross the <For> boundary - that itself needs to be a signal in order to update the list, otherwise nothing updates. But it seems that as long as it is a signal, everything updates (which does make sense).
5 replies
SSolidJS
Created by jon vuri on 11/14/2023 in #support
How to set a store back to a default state at the top level (or clear it)?
I see. that's definitely a bit obscure (as in, not obvious what it's doing, and would need a comment), but at least it's just one line. Thank you!
8 replies
SSolidJS
Created by jon vuri on 11/14/2023 in #support
How to set a store back to a default state at the top level (or clear it)?
Because updates are shallowly merged, even from the function version of setInputs, I'm not sure how to destructively set the entire store to a value (in this case, an empty object), like the original input to createStore. But that's the rough effect I'm seeking
8 replies
SSolidJS
Created by jon vuri on 10/9/2023 in #support
Can reconcile be used on its own?
that's essentially how I'm doing it now, yes, returning 'results' and 'queryState' signals together as a tuple. The only weird bit is that I do manual diffing of old and new results in the update function (to maintain object references for unchanged rows) - but that is all localized to that function and not really anything to do with reactivity, I'm realizing
7 replies
SSolidJS
Created by jon vuri on 10/9/2023 in #support
Can reconcile be used on its own?
Next time I revisit this logic, I'll just switch back to stores, and try to isolate the trouble I was having further
7 replies
SSolidJS
Created by jon vuri on 10/9/2023 in #support
Can reconcile be used on its own?
Got it, thank you for your help! I really just switched to signals for my use case because it was a somewhat complex query result with loading state and I wanted different reactivity at various levels. At the same time, I am learning Solid for the first time and stores are kinda hard to grapple with at first, signals are much more straightforward. So, this was really just an attempt to avoid stores.
7 replies