SHARE
TWEET

Untitled

a guest Jun 15th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import { STATUS_OPTIONS } from './utils/config'
  4.  
  5. Vue.use(Vuex)
  6. export default new Vuex.Store({
  7.   state: {
  8.     room: undefined, // Current room
  9.     username: undefined, // Username
  10.     status: STATUS_OPTIONS.available, // User status
  11.     rooms: [] // Available rooms in the whole chat
  12.   },
  13.   mutations: {
  14.     // Mutation per action (joinRoom, changeRoom, setRooms, leaveChat, changeStatus)
  15.   },
  16.   actions: {
  17.     // Here we define all the actions that will get triggered when:
  18.     // joinRoom, changeRoom, setRooms, leaveChat, changeStatus
  19.   }
  20. })
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top