Allow dynamic api calls for static pages #78402
Unanswered
tumenbaev
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Right now next pushes everyone to use static rendering however there're some use cases that block us from doing it. So my proposal is to give an api that allows to call dynamic api like cookies, headers and maybe others without opting out of static rendering.
Here are some examples:
The way to solve it could be some api that allows passing data from middleware to the page. Maybe it could be added to NextResponse like
NextResponse.redirect(url, { additionalData })
.Or it could be some new way to call dynamic api like
unsafeCookies()
to get cookies that would be shared across requests from different users.Beta Was this translation helpful? Give feedback.
All reactions