Wilson Duan
Wilson Duan

Reputation: 23

Why is are my emmet abbreviations not working with React on VSCode?

Emmet abbreviations are working with HTML, but when I try to do something like rcc on a Javascript file, the React abbreviation fails to show up. I have tried modifying my user settings, which currently look like this:

"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
    "javascript": "javascriptreact"
},
"files.associations": { 
    "*.js": "javascriptreact" 
}

Here is an image of what shows up when I type rcc: enter image description here

I'd appreciate any help.

Upvotes: 0

Views: 3125

Answers (3)

Namrata Sanja
Namrata Sanja

Reputation: 236

rcc is display in suggestion

rcc display this code

install React & Redux Snippets extention see below:

React & Redux Snippets extention

Upvotes: 1

Sachin
Sachin

Reputation: 21

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

Above snippet enables emmet for JS/JSX code and it should be working fine. For react snippets using abbreviations please try below extension. I use the same for it.

ES7 React/Redux/GraphQL/React-Native snippets

Upvotes: 2

Shriever
Shriever

Reputation: 36

Your emmet is likely working, but abbreviations like rcc are from JS Snippets. I use the VS code extension JS JSX Snippets by sky ran.

Hope this helped.

Upvotes: 1

Related Questions