November 2017
Beginner to intermediate
398 pages
8h 42m
English
We will store the user data inside a state object like we did in Chapter 3, Project 2 - Castle Duel Browser Game, so we can access it in any component of the app:
export default { user: null, }
The user property will be null when no user is logged in, or else it will contain the user data.
import state from './state'
new Vue({ el: '#app', data: state, router, render: h => h(AppLayout), })
Read now
Unlock full access