Skip to content
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

Add page-context logic #65897

Open
wants to merge 2 commits into
base: canary
Choose a base branch
from
Open

Add page-context logic #65897

wants to merge 2 commits into from

Conversation

vordgi
Copy link
Contributor

@vordgi vordgi commented May 17, 2024

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.

image


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.

@ijjk
Copy link
Member

ijjk commented May 17, 2024

Allow CI Workflow Run

  • approve CI run for commit: f3129fc

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants