Environment
- Operating System:
Darwin
- Node Version:
v16.15.0
- Nuxt Version:
3.0.0-rc.7
- Package Manager:
npm@8.13.2
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
https://stackblitz.com/edit/github-2wanhk?file=plugins/test.client.ts
Describe the bug
Not sure if this is a bug or if it is intentional. However, in the previous version of the app:rendered hook the ssrContext was mutable.
Using the app:rendered hook you can access the HTML including ssrContext, however, you cannot mutate its value. It seems like the HTML is already generated at this point, and no longer mutable.
nuxtApp.hook('app:rendered', ({ssrContext}) => { ssrContext.payload.state.test = 'test'; });
console.log(window.__NUXT__.state.test) -> undefined
Additional context
No response
Logs
No response
Environment
Darwinv16.15.03.0.0-rc.7npm@8.13.2vite---Reproduction
https://stackblitz.com/edit/github-2wanhk?file=plugins/test.client.ts
Describe the bug
Not sure if this is a bug or if it is intentional. However, in the previous version of the app:rendered hook the ssrContext was mutable.
Using the app:rendered hook you can access the HTML including ssrContext, however, you cannot mutate its value. It seems like the HTML is already generated at this point, and no longer mutable.
nuxtApp.hook('app:rendered', ({ssrContext}) => { ssrContext.payload.state.test = 'test'; });console.log(window.__NUXT__.state.test) -> undefinedAdditional context
No response
Logs
No response