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: Clarify that the API route need to stay in the pages folder #848

Merged
merged 2 commits into from
Oct 25, 2023
Merged
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
4 changes: 4 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,10 @@ 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.

**What not to change:**

`/pags/api/rpc/[[...blitz]].ts` stays in the `/pages` folder.

#### Recommendations

- For Blitz apps that have their pages at `/src/pages` it is recommended to colocate the app directory at `/src/app`. However, a root `/app` App directory is also supported. More on the new NextJS file structure at ["Project Organization and File Colocation"](https://nextjs.org/docs/app/building-your-application/routing/colocation#src-directory).
Expand Down
Loading