devanil
devanil

Reputation: 521

Is there any extension like emmet for react native in VS CODE?

Emment for react is working fine after I added the JSReact to settings JSON in VS code.

Emmet for react

'''.main>h2.heading>p.body ''' this translated into

<div className="main">
  <h2 className="heading">
    <p className="body"></p>
 </h2>
</div>

But the same cannot work for react native.

Questions 1)Is there a way to activate emment for react native? 2)What are the options to type react native codes faster with shortcuts?

Already tried below solution and it works for react only

adding below code to settings.json in VS code

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

Upvotes: 1

Views: 1109

Answers (1)

Hessuew
Hessuew

Reputation: 773

Yes there is: https://marketplace.visualstudio.com/items?itemName=SaugatMaharjan.nativeemmet

But notice it seems that this extension works only in .js files, not with .tsx for example

Upvotes: 3

Related Questions