javascript - Autocomplete for React components in vscode - Stack Overflow

is there a way for autoplete react ponents like JSX tags , like this code below, I want VS code to auto

is there a way for autoplete react ponents like JSX tags , like this code below, I want VS code to autoplete Header, Main and Footer Components and so on

function App() {
    return (
    <>
      <Header />
      <Main />
      <Footer/>
    </>
    );
}

is there a way for autoplete react ponents like JSX tags , like this code below, I want VS code to autoplete Header, Main and Footer Components and so on

function App() {
    return (
    <>
      <Header />
      <Main />
      <Footer/>
    </>
    );
}

Share Improve this question asked Dec 6, 2021 at 21:46 Mahmoud AbdulmutyMahmoud Abdulmuty 3586 silver badges15 bronze badges 3
  • Checkout this link for prop pletion dev.to/maxbvrn/react-props-auto-plete-in-vs-code-2ana You should clarify whether you expect the tag names or their attributes to be auto pleted – Ruan Mendes Commented Dec 6, 2021 at 21:51
  • Do you mean the attributes for those tags or the tags themselves? If the attributes, stackoverflow./a/70249577/836330 may help. – Mark Commented Dec 6, 2021 at 21:51
  • check answers here stackoverflow./questions/39320393/… – wagonaf979 Commented Dec 7, 2021 at 9:17
Add a ment  | 

1 Answer 1

Reset to default 4

The most straight-forward way to get JSX/HTML autoplete in your React projects is to add this to your user settings or workspace settings (<project-path>/.vscode/settings.json):

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

You may have to restart VS Code for the change to take effect.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745271410a4619768.html

相关推荐

  • javascript - Autocomplete for React components in vscode - Stack Overflow

    is there a way for autoplete react ponents like JSX tags , like this code below, I want VS code to auto

    2小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信