What are the significant differences between naming a JavaScript file with .js or .jsx
What are the significant differences between naming the JavaScript file in a React application with the .js or .jsx extension even though you can still write JSX in both?
I find it useful to name them separately just to make it clear which files have JSX and which do not. Some code tools benefit from the explicit file extension; and you might have different linting settings, associate them with different test types and so on.
Basically it's just a bit more accurate. We also name ts/tsx separately from js/jsx for much the same reason.
Ben Buchanan (200ok)
I make some bits of the web.
I find it useful to name them separately just to make it clear which files have JSX and which do not. Some code tools benefit from the explicit file extension; and you might have different linting settings, associate them with different test types and so on.
Basically it's just a bit more accurate. We also name ts/tsx separately from js/jsx for much the same reason.