SomeRandomNiko
Reactivity issues with array items
Hey, I am having trouble figuring out how to create an effect that only runs when a property inside an object inside an array changes. I have a store that is a top level array and contains objects with an id and some content (which can be null).
https://playground.solidjs.com/anonymous/b6728a0c-03a2-48e8-b8d7-27e483d22a8a
In this playground I set up a minimal example. The effect logs the containers with content (where the content is not null) to the console.
I want to log the containers when
- The content changes
- The content is removed
- The content is added
I don't want to log the containers when
- An empty container is added
- An empty container is removed
Any help would be greatly appreciated!
10 replies