Skip to content
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

Docs: Incorrect file extension #74175

Open
henilshahdev opened this issue Dec 20, 2024 · 4 comments · May be fixed by #74197
Open

Docs: Incorrect file extension #74175

henilshahdev opened this issue Dec 20, 2024 · 4 comments · May be fixed by #74197
Labels
Documentation Related to Next.js' official documentation.

Comments

@henilshahdev
Copy link

What is the documentation issue?

File extension is incorrect. JavaScript files with JSX code should have the extension of .jsx instead of .js.

image

Is there any context that might help us understand?

It's a table under the Language and Filename section on the Contribution Guide.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/community/contribution-guide#language-and-filename

@henilshahdev henilshahdev added the Documentation Related to Next.js' official documentation. label Dec 20, 2024
@Netail Netail linked a pull request Dec 20, 2024 that will close this issue
@gsaivaraprasad123
Copy link

Can u assign this to me ?

@Netail
Copy link
Contributor

Netail commented Dec 22, 2024

Can u assign this to me ?

Already 2 open PRs

@gsaivaraprasad123
Copy link

gsaivaraprasad123 commented Dec 22, 2024 via email

@Marukome0743
Copy link
Contributor

I wonder if it's intentional to use js extension in jsx language.

For example, see 01-installation.mdx.

```jsx filename="app/layout.js" switcher
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
```

This app/layout.js is JSX file.
However filename uses js extension.

create-next-app templates also use layout.js.
That's why contribution guide might not be wrong.

By the way, I prefer jsx extension like app/layout.jsx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants