Skip to content

chore: add css flicker notice > migrate-from-next-js.md #4288

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

Open
wants to merge 2 commits 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
24 changes: 14 additions & 10 deletions docs/start/framework/react/migrate-from-next-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ This step-by-step guide provides an overview of how to migrate your Next.js App

Before we begin, this guide assumes your project structure looks like this:

```txt
```
.
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── public
├── tsconfig.json
├── README.md
├── public/
│ ├── file.svg
│ ├── globe.svg
│ ├── next.svg
│ ├── vercel.svg
│ └── window.svg
├── README.md
├── src
│ └── app
│ ├── favicon.ico
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
└── tsconfig.json
└── src/
└── app/
├── favicon.ico
├── globals.css
├── layout.tsx
└── page.tsx
```

Alternatively, you can follow along by cloning the following [starter template](https://github.com/nrjdalal/awesome-templates/tree/main/next.js-apps/next.js-start):
Expand Down Expand Up @@ -172,6 +173,9 @@ function RootLayout() {
}
```

> [!NOTE]
> When using `import "./globals.css"` directly, you may notice a flicker on the initial load. This is expected behavior during development and does not occur in production. It will be addressed in a future update. Alternatively, for now you can refer to this [example](https://tanstack.com/start/latest/docs/framework/react/examples/start-basic) for now to address this issue.

### 5. Adapt the Home Page

Instead of `page.tsx`, create an `index.tsx` file for the `/` route.
Expand Down