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
1 Answer
Reset to default 4The 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
评论列表(0条)