SolidJSS
SolidJSโ€ข3y agoโ€ข
11 replies
ringsig

Listening to all changes in an array or object in a store

Hi! I have a store that has arrays and objects inside it. I want to listen to all changes in a tree.

For instance, suppose this is my store:
{
    "array": [
        { "name": "object1" },
        { "name": "object2" }
    ]
}


and I want to use the on helper to listen to this array such that whenever array, array[n] or array[n].name changes, my effect will be called.

Is there some way to do that?
Was this page helpful?