You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario where I have an object that I'd like to turn into a micro-observable so I can use with the rest of observable state in the project.
I initially thought I could use Observable.compute(), but of course this is to compute only other structures already represented as an Observable value from micro-observables.
How about the idea of adding a Observable.proxy or Observable.wrap method, which could use the Proxy API to listen for changes in these situations?
The text was updated successfully, but these errors were encountered:
Thanks for the very interesting idea! Personally, I'm not fond of the Proxy API as I think it adds too much implicitness and it makes it hard to track the code that mutates observables and that could trigger side-effects (e.g. re-rendering of components, writing to storage).
I have the idea to integrate Immer into Micro-observables to make it easier to update complex objects, without having to rely on complex spread operators. That would basically work like this:
I have a scenario where I have an object that I'd like to turn into a micro-observable so I can use with the rest of observable state in the project.
I initially thought I could use Observable.compute(), but of course this is to compute only other structures already represented as an Observable value from micro-observables.
How about the idea of adding a Observable.proxy or Observable.wrap method, which could use the Proxy API to listen for changes in these situations?
The text was updated successfully, but these errors were encountered: