Skip to content

docs(lazy-loading): add caveat to importing client components section#76358

Merged
samcx merged 1 commit intocanaryfrom
sam/docs/lazy-loading
Feb 24, 2025
Merged

docs(lazy-loading): add caveat to importing client components section#76358
samcx merged 1 commit intocanaryfrom
sam/docs/lazy-loading

Conversation

@samcx
Copy link
Copy Markdown
Member

@samcx samcx commented Feb 22, 2025

Why?

Automatic code-splitting is currently not supported when a Server Component dynamically imports a Client Component.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. labels Feb 22, 2025
Copy link
Copy Markdown
Member Author

samcx commented Feb 22, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@samcx samcx requested review from gaojude and huozhi February 22, 2025 00:07
@samcx samcx marked this pull request as ready for review February 22, 2025 00:08
@jthorupp
Copy link
Copy Markdown

I think it's great to include this in the official docs, but i am also keen on knowing if it will be supported in the future. I know it's hard to say when it would be supported but that would also be greatly appreciated to include 🤓

@samcx
Copy link
Copy Markdown
Member Author

samcx commented Feb 24, 2025

@jthorupp Sometimes we discover later things cannot be supported or a better, different solution comes along, so I'll opt to not include a mention like that in our documentation. We also don't have language like this in our documentation, so would also opt to not include for consistency.

In this case, I think we are definitely looking to fix/improve this, so hopefully we can start sharing updates soon!

@samcx samcx merged commit a27d411 into canary Feb 24, 2025
57 checks passed
@samcx samcx deleted the sam/docs/lazy-loading branch February 24, 2025 23:37
@jthorupp
Copy link
Copy Markdown

Thanks for clarification! 🙌

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: the lazy components should add a note that they cannot work directly from server components.

3 participants