arqex / freezer

A tree data structure that emits events on updates, even if the modification is triggered by one of the leaves, making it easier to think in a reactive way.
MIT License
1.28k stars 56 forks source link

Set function is not working #117

Open Nivedha-Palani opened 3 years ago

Nivedha-Palani commented 3 years ago

I got a weird issue. Sometimes, the set function is not working. the value is not updating in Freezer. Still i'm seeing the older value. Please help me to handle this. After this, Even a onclick method is not working

arqex commented 3 years ago

Be careful when caching the values of freezer, you might be trying to update a value that is not attached to the main freezer object.

Instead of doing

let e = freezer.get().e
// ....
e.set('foo', 'bar')

Try to always update from the freezer store directly

freezer.get().e.set('foo', 'bar')
Nivedha-Palani commented 3 years ago
freezer.get().e.set('foo', 'bar')

I'm doing like this only. It is working fine but, sometimes it is not working . After that the application got freeze. we couldn't perform any other action.

while using pivot function to set multiple value, few values are updated. few are not updated. I couldn't able to figure out the issue