Commit 7e6e25de authored by Bart Deslagmulder's avatar Bart Deslagmulder Committed by Tim Neutkens

Add .jsx as a valid file extension in the pages directory (#10281)

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.
parent b0053a4a
...@@ -39,7 +39,7 @@ These scripts refer to the different stages of developing an application: ...@@ -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 - `build` - Runs `next build` which builds the application for production usage
- `start` - Runs `next start` which starts a Next.js production server - `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. 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment