REEEEE
How to modify array partially?
reconcile
would be the way to go. reconcile
returns a function that takes in the previous state object. The store setter accepts a function as an argument where it provides you the previous value
Obviously creating a new array isn't ideal. You use reconcile here and it's equivalent to this
10 replies
Why does my component only update in a dummy For loop?
You can do this
OR
to make the read to props.content reactive. Since solid components don't generally rerun, once you read the prop (like in your original use), it gets that value at the time of read and that's it. Only effects, memos, jsx, and functions (for the most part) are reactive. If you read props or any reactive value in the body of the component it won't be reactive
15 replies