Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  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. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement