-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
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
Incorrect next state with actions updating slices of state #19
Comments
The root cause, of course, is that Hyperapp performs a shallow merge of your action result/return with the existing state in the same slice and finally returns only the partial state that was merged in to the caller. I can think of three ways of solving this:
|
Well, I played around with this a little bit and it seems that some actions get lost when asynchrony is involved. Please ignore... |
Imagine the following scenario:
Let's run
inc1()
action and here's what we see...prev state:
next state:
What's expected next state:
Right now logger simply returns the result of an action, and I strongly believe that it should return merged slice of a state.
Here's an illustration
BTW, thanks for logger!
The text was updated successfully, but these errors were encountered: