DeepTrack for a `Component[]` (Deeptrack for functions)
Hi! Is this possible?
Let's say I have:
// Assuming the "LStore" is a
createStore
And I have a deeptrack utility like so:
5 Replies
reconcile
for an Array of functions.
Any suggested workarounds for this'?\it's handy for this type of stuff to have a reproduction in the https://playground.solidjs.com/
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
My bad @bigmistqke 🌈 ! Here it is:
https://playground.solidjs.com/anonymous/69a38084-c833-44e9-8f28-749a8c9799bd
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
are you trying to use a function as an object?
idk why else you'd want deep reactivity on a raw function
wrapped in an array it works as expected i believe?
https://playground.solidjs.com/anonymous/3917c01c-1670-4e53-9341-e10ebbc79540
https://playground.solidjs.com/anonymous/ccf6e719-b81a-46fa-8255-e980be841dbb
otherwise, shallow:
https://playground.solidjs.com/anonymous/4a71a4ac-f5c4-4388-b057-6e0dbfc49242
Reconcile on array works too:
https://playground.solidjs.com/anonymous/15b6ea3c-a814-4e14-9b16-e9456732e351
no problem at all! just makes it easier to discuss 🙂
sorry for the radiosilence, was afk
It's an unorthodox use of
createStore
. afaik createStore
only works with arrays and objects, not set/map/functions.
like halu mentioned above