How to make VS Code change language to JavaScript React when open a JSX file

Within VS Code, in the bottom right of the window you will see a smiley face - to the left of that is the language the currently visible file is associated with (e.g. JavaScript). Ensure your currently opened file is a .jsx file.

Clicking this will reveal a menu at the top. Click the Configure File Association for '.jsx'..., and then choose "JavaScript React".


The setting goes to config file should be something like below,

"files.associations": {
    "*.jsx": "javascriptreact"
}

Press cntrl + , and add this to user settings JSON file:

"files.associations": {
    "*.js": "javascriptreact"
}

like this: enter image description here


Instead of the config file, I do click on the extensions in the bottom right of the window. Then click on configure File Association for '.jsx' and he asked me to select a language and I selected Javascript React. and now all the files are Javascript React with a little react icon