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

Update usage-next-13.mdx: Hint at loading.tsx files #846

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/pages/docs/usage-next-13.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Add the new `use client` directive to the following files:
1. `src/blitz-client.(ts|js)`
2. All Files with usage of `useQuery`, `useInfiniteQuery`, `usePaginatedQuery`, `useMutation`, `Hydrate` and other React Query client side hooks.

#### Migrate `<Suspense>` to `loading.tsx`

In the `/pages` folder, page components are split in two to manually add a `<Suspense>` boundary ([Example](https://github.com/blitz-js/blitz/blob/main/packages/generator/templates/page/__modelIdParam__.tsx#L84-L86)).

Following the `/app` folder [file conventions](https://nextjs.org/docs/app/building-your-application/routing#file-conventions) this logic can be migrated to [special `loading.tsx` files](https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming) within each subfolder.

#### BlitzProvider {#blitz-provider}

This provider should wrap the app and should be placed at the `(root)/layout.ts` file.
Expand Down
Loading