-
Notifications
You must be signed in to change notification settings - Fork 206
docs(guides): update next.js tech guide to the relevant status #830
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
base: master
Are you sure you want to change the base?
Conversation
…vices' layer with default 'features', add all default layers to a structure tree
Co-authored-by: Lev Chelyadinov <[email protected]>
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.
Pull Request Overview
A concise update of the Next.js integration guide to prioritize the App Router, add import examples, and flesh out recommendations.
- Standardize all references from “NextJS” to “Next.js” and reorganize conflict sections.
- Introduce code snippets for re-exporting pages, middleware, instrumentation, and route handlers.
- Enhance guidance with additional recommendations and updated links to Next.js documentation.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
i18n/ru/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx | Refined headings and routing sections, added App Router examples, middleware/instrumentation/route-handler guidance, and extra recommendations |
i18n/en/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx | Mirrored updates in English: standardized naming, new code examples, and extended best practices |
Comments suppressed due to low confidence (2)
i18n/ru/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx:66
- Тип
IProps
не определён в примере; скорее должен использоватьсяAppProps
из Next.js или необходимо добавить определение интерфейсаIProps
.
const App = ({ Component, pageProps }: IProps) => {
i18n/en/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx:65
- The example uses an undefined
IProps
type; it should useAppProps
from Next.js or include a definition forIProps
.
const App = ({ Component, pageProps }: IProps) => {
i18n/ru/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx
Outdated
Show resolved
Hide resolved
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.
Спасибо, стало намного лучше! Оставил несколько предложений по улучшениям
i18n/en/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx
Outdated
Show resolved
Hide resolved
i18n/en/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx
Outdated
Show resolved
Hide resolved
i18n/en/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx
Show resolved
Hide resolved
├── shared | ||
├── widgets | ||
### Route Handlers | ||
It is suggested to use a new `routes` segment in the `app` or `pages` layer to work with Route Handlers. |
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.
issue: this part isn't clear to me. You mention that it's recommended to use the routes
segment, but the code block below doesn't demonstrate it.
suggestion: let's also add a code block where getExample
is defined so that it's clear how and where to define route handlers
But also, should this really be in the FSD structure? I feel like mixing in unrelated backend code into the frontend code folder might make it hard to find. Let's discuss and refine this point a bit, perhaps also get people from the chat to give their opinion
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.
But also, should this really be in the FSD structure? I feel like mixing in unrelated backend code into the frontend code folder might make it hard to find. Let's discuss and refine this point a bit, perhaps also get people from the chat to give their opinion
Указал этот кейс для каких-то простых сценариев, которые могут возникнуть. Думаю можно написать дополнительно, что в целом идея смешения серверной логики и фронтовой в рамках одного проекта это плохая идея
Перенёс приоритет с pages на app router, добавил небольшие примеры с импортами и тезисно дописал несколько рекомендаций