Nuxt/test/fixtures/basic/pages/special-state.vue

16 lines
265 B
Vue
Raw Normal View History

2017-07-27 14:50:24 +00:00
<template>
<h1>Special state in `window.__NUXT__`</h1>
</template>
<script>
export default {
middleware ({ beforeNuxtRender }) {
if (process.server) {
2017-07-27 14:50:24 +00:00
beforeNuxtRender(({ nuxtState }) => {
nuxtState.test = true
})
}
}
}
</script>