Skip to content
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

Duplicate Reducer Method Invokation #53

Open
zlanich opened this issue Oct 23, 2020 · 0 comments
Open

Duplicate Reducer Method Invokation #53

zlanich opened this issue Oct 23, 2020 · 0 comments

Comments

@zlanich
Copy link

zlanich commented Oct 23, 2020

Hey there! I'm reporting a bug that seems to have also appeared in use-immer.

When invoking a reducer function, it fires twice initially, but it appears that it does not modify the state twice.

I've reproduced it in CodeSandbox: https://codesandbox.io/s/immer-reducer-duplicate-invokation-iylwj

use-immer Issue: immerjs/use-immer#11

The solution seemed to have something to do with the need to memo a produce()'d reducer, or something along those lines.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant