Nuxt/test/fixtures/basic/pages/before-nuxt-render.vue

16 lines
277 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.beforeNuxtRender = true
2017-07-27 14:50:24 +00:00
})
}
}
}
</script>