Data flow in Vue and Vuex - Part 2
VUEX CHAT PART 2
After the post 'Data flow in Vue and Vuex, a closer look', Benjamin Listwon has created a second one, taking the tutorial further, by introducing modules, constants for mutation names, and organazing actions, regarding Vuex.
This time around I wanted to demonstrate messaging between clients as we started to modularize, but not require much in the way of additional npm packages or running additional servers.
The author makes use of this API, to simulate passing messages between clients. Follow up in Benjamin Listwon's blog.
Steps covered:
- Using vuex modules
- Mixins
- Main event, in
client.vue
- Local Storage
Check out the Demo, and try opening 2 windows and chat between them.
The repository with the code of the tutorial.