-
Notifications
You must be signed in to change notification settings - Fork 706
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
Migrate to dynamicIO
#198
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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> |
There was a problem hiding this comment.
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
.
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 theuseLinkStatus
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.