Skip to content

Display warning if root state property has the same name with module #1363

Closed
@hootlex

Description

@hootlex

What problem does this feature solve?

If there is a root state property with the same name of a module, the module is prioritized. Right now there is no warning.

Example:

// store
modules: {
    users
},
state: {
    users: []
}

store.state.users points to the users module and users state property is shallowed

What does the proposed API look like?

There should be a warning pointing out the mistake and intriguing the user to rename the state property.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions