Skip to content

Add Vuex 2.0 Deprecations (lower priority, as upgrading to Vuex 2.0 is optional for Vue 2) #2

Closed
@chrisvfritz

Description

@chrisvfritz

Patterns:

  • vuex: { should be replaced by action/mutation/getter/state helpers on methods and computed properties
  • store.watch('XXX', ...) -> store.watch(state => state.XXX, ...) The 1st argument of watch should be the function that returns sub state tree.
  • middlewares -> plugins
  • store.dispatch -> store.commit mutations are now triggered by commit method.
  • The arguments of store.dispatch and store.commit is no longer variadic. It now accepts a single payload value as the 2nd argument.
  • silent flag for silent dispatch is now declared in 3rd argument options object.
  • payload arguments changes (see Add Vuex 2.0 Deprecations (lower priority, as upgrading to Vuex 2.0 is optional for Vue 2) #2 (comment))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions