Vuex is a state management library that lets us handle and ultimately store data from our UI. In this article, we'll be introducing you to the concepts around Vuex, how to use it, and how to store your data locally with it.
What Is Vuex?
You are probably familiar with the concept of state, which is just a fancy way of saying data. We can store the state in Vue within the data()
function itself. For example, in the below Vue component, we are storing a toggle state as false, and whenever we click our button in the template section, we set it to true:
from DZone.com Feed https://ift.tt/SPzAn3h
No comments:
Post a Comment