use-reducer-with-side-effects icon indicating copy to clipboard operation
use-reducer-with-side-effects copied to clipboard

init function passes internal state, not initial reducer state

Open cameronbraid opened this issue 3 years ago • 0 comments

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
})

cameronbraid avatar Apr 10 '21 07:04 cameronbraid