Created
October 17, 2016 22:39
-
-
Save ignasbernotas/16c86088b0b336e1c24f4b3cfc61af94 to your computer and use it in GitHub Desktop.
Vuex initial data preloading plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as types from './../mutation-types' | |
export default function loadInitialState () { | |
return store => { | |
const actions = [ | |
types.UPDATE_PROJECT_LIST | |
] | |
actions.forEach(action => store.dispatch(action)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment