Complete Vue.js 2 Web Development_ Practical guide to building end-to-end web development solutions with Vue.js 2

(singke) #1
State Management with Vuex Chapter 21

We then have an application that displays the current count and can be incremented,


decremented, or reset:


Payloads


What if we wanted to let the user decide how much they wanted to increment the count?


Let's say we had a textbox that we could add a number and increment the count by that


much. If the textbox was set to^0 or was empty, we'd increment the count by 1.

Free download pdf