Reset signals when prop value changes
How can I reset the
showFront
state of Card
when Card
's props.data
changes?
5 Replies
Currently resetting this way, is there a better way? :
Generally speaking, what you're looking for is a writeableMemo. I believe #solid-primitives has an implementation you can use
I tried the following and doesn't cause re-rendering for all Card components, is this a decent solution or should I use
createWritableMemo
?
Nah, I didn't quite realize your use case
Not quite a fit
Anyway, if it works it works
i mean one should not read a prop in the main body of the component afaik
wouldn't this be cleaner