Skip to content
Discussion options

You must be logged in to vote

That's a great question!

The docs currently suggest validation in the root layout, because it works for both static as well as dynamically rendered apps. What Next.js does though, is it renders relevant layouts and pages in parallel, therefore while you're waiting for your root layout to interrupt the render, a page might render as well.

If you check out e.g. example-app-router, in a page we're enabling static rendering by calling setRequestLocale based on a received locale:

// Enable static rendering
setRequestLocale(locale);

Now, the locale isn't used directly though, but aut…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@abarani
Comment options

Answer selected by abarani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants