Skip to content

RootState should be a complete copy not a reference. #1939

@rauan100

Description

@rauan100

Version

3.6.2

Reproduction link

https://codesandbox.io/s/dank-https-tqtvo?file=/src/store/index.js

Steps to reproduce

Change input value

What is expected?

It is expected that the profile state value does not change

What is actually happening?

the profile state is change


The rootState parameter passed to an action, should be a complete copy of the state, not a reference. This allows me to change the state of another module without using an action or a commit for that module.

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