I don't use anything in particular. I do have a dispatcher and event-based state updates, but I'm not sure why I'd need more than that.
Hello everyone, question : in :will-update
, how to access the previous state of component ? The state
I receive in this hook in the new state.
In React.js, it does receive the new state as well, but you can access the old state with this.state
. https://reactjs.org/docs/react-component.html#componentwillupdate
I found (rum/state (:rum/react-component state))
. I think this is what I want.
For those interested, it returns a Volatile. Be sure to deref
if you want to access the values.