We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prev
state
Please take a look at my example (pls open console to see logs).
On every 'counter:increment' action onStateChange handler logs the same values for state.counter.count in state and prev objects:
'counter:increment'
onStateChange
state.counter.count
Is it intended?
The text was updated successfully, but these errors were encountered:
Also I'm a bit confused that inside choo.js onStateChange function has different signature - https://github.com/yoshuawuyts/choo/blob/master/index.js#L89
Sorry, something went wrong.
@yoshuawuyts I really like the concepts and minimal API of the library and would like to use it inside of my project but this issue stops me for now.
currently thinking of actually ditching the prev argument because it causes a fair amount of complexity in the API - wouldn't rely on it tbh
Instead you can hold your own reference to the prev instance of state, for example inside a closure (:
No branches or pull requests
Please take a look at my example (pls open console to see logs).
On every
'counter:increment'
actiononStateChange
handler logs the same values forstate.counter.count
instate
andprev
objects:Is it intended?
The text was updated successfully, but these errors were encountered: