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

16 lines
264 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 {
fetch ({ isServer, beforeNuxtRender }) {
if (isServer) {
beforeNuxtRender(({ nuxtState }) => {
nuxtState.test = true
})
}
}
}
</script>