Skip to content

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

@cameronbraid

Description

@cameronbraid

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions