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

fix: wait __NEXT_DATA__ script tag evaluatable when initialize #53423

Closed

Conversation

akagire
Copy link

@akagire akagire commented Aug 1, 2023

Related issues

Why

When Next.js is initializing in client side, Next.js don't wait for dom loaded. Thus, some use case could not load __NEXT_DATA__ textContent. Please check related issues.

Notice that these issues may not be fully reproduced because of a specific browser, browser memory usage, caching, using an extension or something else.

Although, It can prevent by check document.readyState is not loading.

I was afraid this approach has the possibility of degrading first loaded rendering performance, so I checked Lighthouse and it didn't in create-next-app default page.

If I have forget some consideration, please tell and comment this PR.

@ijjk ijjk added the type: next label Aug 1, 2023
@akagire akagire closed this Apr 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants