Non-return part of <For>'s callback only seems to run once?
I have a page where I initially fetch a list of items, then I can type in a search box to filter that list on the client, which is part of a form (using
However, if I do that logic outside the return of
Anyone knows why this is so? It's probably some quirk with Solid that I'm not familiar with. I've done something similar in React and it does work, but it might be one of the big reactivity differences.
(example code in next message)
createStore()) where it's a list of selected items. I tried to perform the checking logic to see if each "searched item" is part of the "selected items" list, and then do some styling + toggle logic on those items. However, if I do that logic outside the return of
<For>'s callback and in the body, then it seems to only run once on first load, and then never again. But it does work if I put it inside the returned JSX for each item instead (which unfortunately means I can't reuse the check-if-already-selected logic).Anyone knows why this is so? It's probably some quirk with Solid that I'm not familiar with. I've done something similar in React and it does work, but it might be one of the big reactivity differences.
(example code in next message)
