Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 45 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3.  
  4. Vue.use(Vuex)
  5.  
  6. const state = {
  7.   user: null
  8. }
  9.  
  10. const mutations = {
  11.   updateUser (state, { user }) {
  12.     Vue.set(state, 'user', user)
  13.   }
  14. }
  15. const getters = {
  16.   user: state => state.user
  17. }
  18. const actions = {
  19. }
  20.  
  21. const store = new Vuex.Store({
  22.   state,
  23.   mutations,
  24.   actions,
  25.   getters
  26. })
  27.  
  28. export default store
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top