-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New hook onSessionBegin()
#1613
Comments
Such a hook would be useful for globally transforming context, such as reconstituting a session class on the client from properties, prior to all other hooks, like guard. Example: file: +onRequestBegin.client.ts
onBeforeRoute does not seem to work in this case because the hook is not invoked on the client on first render, only on navigation. +1 to have this hook implemented. |
I think you can use We should document this somewhere, this is particularly relevant for SSG folks. |
I have a use case where this needs to happen before the guard hook is called. The documentation indicates |
Makes sense, bumped its priority for the |
Description
New hook called right after
renderPage()
(before routing). I.e. it would be the first hook called upon rendering a page.Thanks to #1588, the hook could be used for the server- and/or client-side.
Use case:
Potential alternative: https://vike.dev/onBeforeRoute.
The text was updated successfully, but these errors were encountered: