How to add Emmet autocomplete for .js files in React

adeleke5140

Kehinde Adeleke

Posted on May 22, 2022

How to add Emmet autocomplete for .js files in React

I recently ran into a problem where Emmet autocomplete would work for files ending with the .jsx extension but break break for files with the .js extension.

To solve it, do the following

  1. Click on the settings icon on the bottom left corner.
    vscode settings icon

  2. Click on the document icon to access the settings json file
    vscode settingsjson icon

  3. Add the following lines to the end of the settings.json file

"emmet.includeLanguages": {
    "javascript": "javascriptreact"
  },
  "emmet.triggerExpansionOnTab": true
Enter fullscreen mode Exit fullscreen mode

and voila, Your autocomplete should work as expected.

emmet autocomplete gif

💖 💪 🙅 🚩
adeleke5140
Kehinde Adeleke

Posted on May 22, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related