Add page-context logic#65897
Conversation
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
|
Looks like the rootParams will cover all the main issue that I solved in this PR |
Where can I get more info about the
|
|
As far as I know, this hasn't been particularly described yet, but in linked release it was removed as experimental and became stable Probably the best place to learn more and track progress is this issue - amannn/next-intl#663 (comment) And probably amannn's socials |
What?
We need the ability to obtain data about the page in server components. Primarily for localization, but there are hundreds and thousands of cases where this is necessary. I understand the problems of creating context functions (and recently wrote my results on this here).
But we need a method. Here I propose another way (although I am still waiting for PR on getPathname, despite the fact that it feels great in my package). This is the same functionality that you use when generating pages. It covers a huge number of cases.
Please, look in this direction. This is a very, very serious problem for static applications.
I still do not know all the intricacies of next.js. Therefore, please, give an answer - what is wrong, where else to add this logic, where to write tests, what to consider and check!
Fixes #50405, #43704, #42301, #58862, #50575, etc.