Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
php server side rendering
// js/store.js
import Vue from 'vue'
import Vuex from 'vuex'
export function createStore() {
return new Vuex.Store({
state: {
user: {}
mutations: {
setUser(state, { user }) {
state.user = user;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment