Skip to content

Commit

Permalink
Add .jsx as a valid file extension in the pages directory (#10281)
Browse files Browse the repository at this point in the history
It's possible to use a .jsx file extension in the `pages` directory but the doc doesn't mention it.
Next to the current extensions: .js, .ts & .tsx I would mention .jsx also in the list.
  • Loading branch information
bartdeslagmulder authored and timneutkens committed Jan 27, 2020
1 parent b0053a4 commit 7e6e25d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/getting-started.md
Expand Up @@ -39,7 +39,7 @@ These scripts refer to the different stages of developing an application:
- `build` - Runs `next build` which builds the application for production usage
- `start` - Runs `next start` which starts a Next.js production server

Next.js is built around the concept of pages. A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.ts`, or `.tsx` file in the `pages` directory.
Next.js is built around the concept of pages. A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.jsx`, `.ts`, or `.tsx` file in the `pages` directory.

Pages are associated with a route based on their file name. For example `pages/about.js` is mapped to `/about`. You can even add dynamic route parameters with the filename.

Expand Down

0 comments on commit 7e6e25d

Please sign in to comment.