VueX Notes

# Genral concepts

# What is VueX

A state management libaray that can share data through all the pages and components

# The benefit of using it

  • management the data at one place that can be easily maintenance and develop
  • share the data without passing it one layer to one layer
  • The data stored in VueX is responsive . It will update automaticly

# What type of data suits to store in VueX

Mostly only the data which will be shared across the componenets will be store in VueX

# Basic use

In index.js

import Vuex from 'vuex'
Vue.use(Vuex)

cosnt store = new Vuex.Store({
    state:{
        count : 0
    }
})

In