src/app.js
// app instances on each call (which is called for each SSR request)
app instances on each call (which is called for each SSR request)
app instances on each call ( which is called for each SSR request )
function createApp (httpWWWClientConfig, httpApiClientConfig, platformIsMobile) {
  const store = createStore(httpWWWClientConfig, httpApiClientConfig, platformIsMobile)
  const router = createRouter(platformIsMobile)
  sync(store, router)
  const app = new Vue({
    router,
    store,
    render: h => h(App)
  })
  return { app, router, store }
}
function createApp ( httpWWWClientConfig , httpApiClientConfig , platformIsMobile ) { const store = createStore ( httpWWWClientConfig , httpApiClientConfig , platformIsMobile ) const router = createRouter ( platformIsMobile ) sync ( store , router ) const app = new Vue ( { router , store , render : h => h ( App ) } ) return { app , router , store } }
app instances on each call (which is called for each SSR request)
app instances on each call ( which is called for each SSR request )
// create store and router instances // sync the router with the vuex store. // this registers `store.state.route` // create the app instance. // here we inject the router, store and ssr context to all child components, // making them available everywhere as `this.$router` and `this.$store`. // expose the app, the router and the store. // note we are not mounting the app here, since bootstrapping will be // different depending on whether we are in a browser or on the server.