Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Advanced Vue 2 - Vuex & SSR > Lesson 22

Changing month and year with Vuex mutation

Let's now add a mutation to the store.

So add a mutations property.

So we need, if you recall, if you want to change the value of the current year at the

current month or any state property then you need a mutation to to do that, and then a

component can call the mutation.

So a mutation is simply just a function.

So let's create one called setCurrentMonth, that way any component which needs to change

the current month can do so, and mutations


Back to course page

Click to load comments...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom