From 7e6e25de7cf92c9028f27f770323d839c233e7f6 Mon Sep 17 00:00:00 2001 From: Bart Deslagmulder Date: Mon, 27 Jan 2020 12:52:49 +0100 Subject: [PATCH] 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. --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 357e19d039b4a..6f9c2e716c061 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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.