Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

init function passes internal state, not initial reducer state #42

Open
cameronbraid opened this issue Apr 10, 2021 · 0 comments
Open

Comments

@cameronbraid
Copy link

This surprised me, however it may be intentional

let initialState = {}
useReducerWithSideEffects(reducer, initialState, initArg => {

   here initArg has sideEffects and state properties I was expecting it to be initialState
})
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant