admin管理员组文章数量:1417691
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.
本文标签: javascriptAutocomplete for React components in vscodeStack Overflow
版权声明:本文标题:javascript - Autocomplete for React components in vscode - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745271410a2650913.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论