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

16 lines
259 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 {
2017-10-31 13:26:19 +00:00
fetch({ beforeNuxtRender }) {
if (process.server) {
2017-07-27 14:50:24 +00:00
beforeNuxtRender(({ nuxtState }) => {
nuxtState.test = true
})
}
}
}
</script>