November 2017
Beginner to intermediate
398 pages
8h 42m
English
When the user is successfully logged in, we will dispatch a non-namespaced 'logged-in' action.
'logged-in': { handler ({ dispatch, state }) { if (state.mapBounds) { dispatch('fetchPosts', { mapBounds: state.mapBounds, force: true, }) } if (state.selectedPostId) { dispatch('selectPost', state.selectedPostId) } }, root: true, },
if (user) { // ... dispatch('logged-in') }
Read now
Unlock full access