Giter Club home page Giter Club logo

frontend-masters-vuex's Introduction

Vuex Workshop course materials

Materials for the State Management with Vuex Course

Author: Divya S

Here are the Vue chrome devtools

Code

All code is available on this repo, exercises are saved in submodules so be sure to run the following commands to pick those up:

git clone --recurse-submodules https://github.com/shortdiv/frontend-masters-vuex.git

Troubleshooting

If things seem outdated, try updating submodules with this command:

git submodule update --init --recursive

Slides:

Bonus Content!

Exercises:

State Management Basics (Codepen)

Vuex; the Good Parts (Codepen)

Vuex in SFCs (Local Editor)

  • Exercise 1: Let's move our vuex store into a separate file vuex-sfc[step-0]
  • Exercise 2: Destructure context so it uses the methods commit and dispatch vuex-sfc[step-1]
  • Exercise 3: Update so that the remaining action and getters are using helpers vuex-sfc [step-2]

Composing Actions (Local Editor)

  • Exercise 1: In the fetchFromInventory action, dispatch a call to check the machine state action vuex-compose-actions[step-0]
  • Exercise 2: Create a fail condition, where the machine shows a message when dispensing while stock is < 0 vuex-compose-actions[step-1]

Vuex Modules (Local Editor)

  • Exercise 1: Let's move our store, getters, actions and mutations into separate vuex modules vuex-modules[step-0]
  • Exercise 2: Let's namespace our vuex module and update the actions, and getters in the component appropriately vuex-modules[step-1]

Vuex Modules Cont'd - Static vs Dynamic (Local Editor)

  • Exercise 3: In the operatorView component, extrapolate the store and dynamically load it so that servicing the primary machine doesn't update the other machines vuex-static-vs-dynamic-modules[step-0]
  • Exercise 4: Similarly, in the vendingMachineItem component, extrapolate the store and dynamically load it vuex-static-vs-dynamic-modules[step-1]
  • Exercise 5: In the vendingMachineItem component, create a unique id for every module, this way, the module for every item isn't shared vuex-static-vs-dynamic-modules[step-2]

Vuex Plugins

  • Exercise 1: Let's create our first Vuex Plugin persistState vuex-plugin[master]
  • Exercise 2: Let's modify to use subscribeAction in our Vuex Plugin persistState vuex-plugin[middle-state]
  • Exercise 3: Modify to use subscribeAction (before/after) that listen for action change and register the frequency change vuex-plugin[end-state]

Vuex + Vue Router

  • Exercise 1: In the admin route, create a per-route navigation guard vuex-and-router[step-0]
  • Exercise 2: In the routes file, add metadata to admin and inventory and create a global navigation guard that checks whether a user is logged in vuex-and-router[step-1]

Normalize Vuex State (Local Editor)

  • Exercise 1: Let's create a model of Machine in Vuex ORM vuex-normalize-state[step-0]

  • Exercise 2: Let's create a location model in Vuex ORM vuex-normalize-state[step-1]

  • Exercise 3: Let's create some helper queries in Vuex ORM vuex-normalize-state[step-2]

  • Vuex Workshop Codepen Collection

Vue CLI Resources

Vuex Resources

VS Code Extensions

https://marketplace.visualstudio.com/items?itemName=sdras.vue-vscode-extensionpack

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

frontend-masters-vuex's People

Contributors

shortdiv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.