Skip to content

Migrate to dynamicIO #198

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

Merged
merged 2 commits into from
May 28, 2025
Merged

Migrate to dynamicIO #198

merged 2 commits into from
May 28, 2025

Conversation

unstubbable
Copy link
Contributor

For the useLinkStatus example I had to add a loading boundary, which is required by Dynamic IO for a fully dynamic page. This means that the inline loading indicator is only shown when starting on the home page, and then navigating to the useLinkStatus page and its child pages. When starting at /use-link-status, the loading boundary is available to the client router, and will be used instead of the inline indicator when switching between child pages.

Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
layouts-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 5:14am

Copy link

socket-security bot commented May 21, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​next/​mdx@​15.4.0-canary.38 ⏵ 15.4.0-canary.551001009999100
Updatednext@​15.4.0-canary.38 ⏵ 15.4.0-canary.55100100100100100

View full report

@unstubbable unstubbable marked this pull request as draft May 21, 2025 15:42
@unstubbable unstubbable marked this pull request as ready for review May 28, 2025 04:55
For the `useLinkStatus` example, I had to add a loading boundary, which
is required by Dynamic IO for a fully dynamic page. This means that the
inline loading indicator is only shown when starting on the home page,
and then navigating to the `useLinkStatus` page and its child pages.
When starting at `/use-link-status`, the loading boundary is available
to the client router, and will be used instead of the inline indicator
when switching between child pages.
fallback={<NavItem item={item} close={close} />}
>
<DynamicNavItem item={item} close={close} />
</Suspense>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal here is to put the suspense boundary as deep in the tree as possible, so that the fallback shell for routes with dynamic params can include these elements. Since NavItem was using useSelectedLayoutSegment which suspends on accessing the fallback params, we split it into a dynamic component and a skeleton component. Same for TabContent.

@unstubbable unstubbable merged commit c89a898 into main May 28, 2025
3 checks passed
@unstubbable unstubbable deleted the hl/dio branch May 28, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants