0

Recently, the JSX attributes suggestion feature in VSCode stopped working. For example, when I write <input auto/> I no longer get suggestions like autoFocus for the attribute. I select JavaScript React at the bottom of the code editor, and in my settings.json file I have this line

"emmet.includeLanguages": {
    "javascript": "javascriptreact",
  },

Otherwise, including JSX elements suggestions is working fine. How can I fix this issue?

BlackMath
  • 932
  • 7
  • 24
  • I've observed an issue where my version of VSCode fell out of date and I resolved some problems by upgrading to the latest version –  Nov 16 '21 at 15:00
  • Mine is up-to-date – BlackMath Nov 16 '21 at 15:05
  • 1
    Perhaps investigate this path (https://stackoverflow.com/questions/65508013/vs-code-not-suggesting-jsx-attributes) or try disabling all of your extensions and restarting vscode –  Nov 16 '21 at 15:13
  • Yes, changing the file extension from .js to .jsx fixed the problem. Thanks – BlackMath Nov 16 '21 at 17:09
  • See https://stackoverflow.com/a/70249577/836330 for jsx attribute values in v1.63 release notes. – Mark Dec 06 '21 at 17:40

1 Answers1

1

Change the file extension from .js to .jsx