Skip to content

[Vue warn]: Error in callback for watcher "function () { return this._data.$$state }": "Error: [vuex] Do not mutate vuex store state outside mutation handlers." #976

@TonyLuo

Description

@TonyLuo

Version

2.4.1

Reproduction link

https://github.com/TonyLuo/i-admin

Steps to reproduce

in the parent page call the child component, the child component do nothing with the vuex state.
vuex will not show any error message in following cases:

  1. when remove the child component parent page, everything runs well
  2. comment the props in the child component, everything is ok.

totally no idea what happen

What is expected?

vuex will not do any thing on the child component

What is actually happening?

`vue.esm.js?71e4:479 [Vue warn]: Error in callback for watcher "function () { return this._data.$$state }": "Error: [vuex] Do not mutate vuex store state outside mutation handlers."

(found in )Error: [vuex] Do not mutate vuex store state outside mutation handlers.
at assert (vuex.esm.js?37e1:96)
at Vue$3.store._vm.$watch.deep (vuex.esm.js?37e1:637)
at Watcher.run (vue.esm.js?71e4:2972)
at Watcher.update (vue.esm.js?71e4:2946)
at Dep.notify (vue.esm.js?71e4:778)
at Object.reactiveSetter [as props] (vue.esm.js?71e4:1000)
at normalizeProps (vue.esm.js?71e4:1322)
at mergeOptions (vue.esm.js?71e4:1370)
at resolveConstructorOptions (vue.esm.js?71e4:4273)
at createComponent (vue.esm.js?71e4:3606)`

Metadata

Metadata

Assignees

No one assigned

    Labels

    need reproReproduction code is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions