4

The vscode documentation does not appear to specify the differences between javascript and javascriptreact.

Both appear to work the same including the closing tag per documentation example.

If one is using a reactjs project with .js file extension - what is the the correct setting? And again, where can the differences be tracked

Edit: Changed the verb "recommend" to "correct setting."

Edv Beq
  • 910
  • 3
  • 18
  • 43
  • There is none. Their [official example](https://code.visualstudio.com/docs/nodejs/reactjs-tutorial) is using `.js` for React projects. [It doesn't matter at all.](https://stackoverflow.com/a/46169521/11613622) Just a matter of preference and if someone wants to write/use an extension or configure settings separately for `js` and `jsx`. The same applies for `ts` and `tsx`. Try searching `ext:jsx` and `ext:js` on marketplace. You will rarely find an extension that is available for one but not for another. – brc-dd Jun 25 '21 at 18:08
  • 1
    I think this question is ok and should be reopened. It is about a programming tool. It is pretty narrow in scope and seems answerable. The snark about the question being closed isn't needed though. – zero298 Jun 26 '21 at 05:31

0 Answers0