Fork me on GitHub
#rum
<
2017-10-11
>
jrychter12:10:29

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.

djebbz14:10:13

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.

djebbz14:10:22

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

djebbz14:10:02

I found (rum/state (:rum/react-component state)). I think this is what I want.

djebbz16:10:15

For those interested, it returns a Volatile. Be sure to deref if you want to access the values.