Skip to content

[BUG] Scoped Namespace determination breaks earlier code with nested state #638

@andrew-chargesim

Description

@andrew-chargesim

#634 became a breaking change where updated objects were inserted as subsets of the original rather than replacing it.

e.g.

state={user:{status: 'logged_in'}}

then in an action:
state.user.status = 'logged_out'

mutates the state to:
state={user:{status:'logged_in', user:{status:'logged_out'}}}

It looks like this is since it is automatically assuming a scoped namespace, based on namespace length. This works for a single level state, but on an already multi-level state gets confused breaking earlier code.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions