Unverified Commit 3aa8bc5f authored by Jam Balaya's avatar Jam Balaya Committed by GitHub

docs: add note to language and filename section (#74239)

## Description

Some people are baffled by [JavaScript files with JSX
code](https://nextjs.org/docs/community/contribution-guide#language-and-filename)
in [contribution
guide](https://nextjs.org/docs/community/contribution-guide) due to
mismatch the extension.


![image](https://github.com/user-attachments/assets/d9f16064-a765-4252-98e4-2c608dd27a7c)

Therefore, add the note like the below attention.

> [!NOTE]
> - Make sure to use **`js`** extension with **JSX** code at JavaScript
files.
> - For example, ```jsx filename="app/layout.js"

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

Closes #74175
Co-authored-by: 's avatarSam Ko <sam@vercel.com>
parent 7a0d1b49
......@@ -228,6 +228,11 @@ When writing JavaScript code blocks, we use the following language and extension
| TypeScript files with JSX | ```tsx | .tsx |
| TypeScript files without JSX | ```ts | .ts |
> **Good to know**:
>
> - Make sure to use **`js`** extension with **JSX** code at JavaScript files.
> - For example, ```jsx filename="app/layout.js"
### TS and JS Switcher
Add a language switcher to toggle between TypeScript and JavaScript. Code blocks should be TypeScript first with a JavaScript version to accommodate users.
......
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