Skip to content

In createReducer, why 2 nested functions instead of just 1? #23

@ppo

Description

@ppo

In createReducer, why 2 nested functions instead of just 1?

Why (initialState) => (reducerMap) => (state = initialState, action) =>
instead of (initialState, reducerMap) => (state = initialState, action) =>?
As it's anyway always used as createReducer(…)({…}), right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions