Fork me on GitHub

Hi! How can it be that when my form 2 component depends on ratom it got rerendered, but when it depends on ratom/make-reaction (I need it's :on-dispose feature) component does not rerendered...cant figure it out.


Shouldn't be the case. In the form-2 component, do you deref them in the inner function or the outer one?


minimal example when i use make-some-state - low-level-component got rerendered but with make-some-state* - is not


The picture is not yet complete. The code has nothing that should lead to a re-render - do you change the value of reg-state anywhere? BTW not important, but that doall is not needed.


This example also doesn't seem to be that minimal - it has an extra atom and a ratom that don't seem to be important at all. It also switches between JS and CLJS data structures. Or can you not reproduce the behavior if you remove any or those things?


yeah, ret-state got updates from external JS lib firebase-like, ret-state takes new values from server ( db ) p.s. irl its more complex and doall is needed,


rerenderindg triggers by swaping\reseting the ret-state from external handler which got updates from that JS db


But it only matters that in the first case (subscribing directly to ratom) everything works, but in the second case (with make-reaction) it does not.


I know that I can use r/with-let in component and use (finally) but it entails some boilerplate


If you can create a proper self-contained MRE, I'd be willing to debug it.