DEV Community

Kehinde Adeleke
Kehinde Adeleke

Posted on

4 2

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

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay