Слияние кода завершено, страница обновится автоматически
When you add an example to the examples directory, please follow these guidelines to ensure high-quality examples:
resolutions
in package.json
)package.json
the version of next
should be latest
package.json
the dependency versions should be up-to-dateexport default function
for page components and API Routes instead of const
/let
(The exception is if the page has getInitialProps
, in which case NextPage
could be useful)cms-
with-
pnpm build && pnpm lint
to verify and pnpm lint-fix
for automatic fixes)Also, don’t forget to add a README.md
file with the following format:
DIRECTORY_NAME
with the directory name you’re adding.Example Name
and Description
.name
and version
fields from your package.json
.next/image
.## Notes
section at the end.Deploy your own
section if your example can’t be immediately deployed to Vercel.# Example Name
Description
## Deploy your own
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/DIRECTORY_NAME)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/DIRECTORY_NAME&project-name=DIRECTORY_NAME&repository-name=DIRECTORY_NAME)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [Bun](https://bun.sh/docs/cli/bunx) to bootstrap the example:
```bash
npx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```
```bash
yarn create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```
```bash
pnpm create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```
```bash
bunx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/app/building-your-application/deploying)).
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )