use-reducer-with-side-effects
use-reducer-with-side-effects copied to clipboard
init function passes internal state, not initial reducer state
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
})