0

I am following this React tutorial. At 10:21, he uses the shortcut nav.navbar to create a nav with className "navbar." However, when I try to do this in my code editor (VS Code) it doesn't autocomplete.

Does anyone know how to fix this?

laffytaffy
  • 125
  • 5
  • Does this answer your question? [Trying to use emmet with a react app in vs code](https://stackoverflow.com/questions/50750263/trying-to-use-emmet-with-a-react-app-in-vs-code) – kennarddh Aug 08 '22 at 07:13

2 Answers2

1

Coincidently I was following the same tutorial and got curious about that as well. It seems like VS Code comes with the command that expand Emmet abbreviations using tab disabled. You need to go into VS Code settings and enable this option.

You can do that by going into the settings file and adding the line "emmet.triggerExpansionOnTab": true. Another option is from the settings menu within VS Code (File>Preferences>Settings) and use the search box to look for Emmet: Show Suggestions As Snippets, then check the checkbox.

More information:

https://code.visualstudio.com/docs/getstarted/settings

https://code.visualstudio.com/docs/editor/emmet

Emmet expand abbreviation doesn't work in Visual Studio Code with the attributes

Dan C
  • 21
  • 3
1

on VScode settings search "emmet", look for "Emmet: Include Languages" add item: item: javascript value: javascriptreact

Moran
  • 11
  • 1