Skip to content

Is it a good practice to update the state dynamically based on the payload? #2409

@firaskrichi

Description

@firaskrichi

Is it a good practice to update the state dynamically based on the payload.

Something like this : {...state, ...action.payload.data}

Where if payload = {userName : "John"} only the userName will be changed in the store without having to specify it explicitly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions