self closing components? <cmp />
See original GitHub issueWill there be self closing components this time around? <custom-element />
Issue Analytics
- State:
- Created 9 years ago
- Reactions:6
- Comments:21 (14 by maintainers)
Top Results From Across the Web
Learn About Self Closing JSX Tags - React - Free Code Camp
In this React tutorial we learn about self closing JSX tags. This video constitutes one part of many where I cover the FreeCodeCamp ......
Read more >Self-Closing Tag | React
All tags must be closed, either with the self-closing format or with a corresponding closing tag ... Every React component can be self-closing:...
Read more >When is a / required in a self-closing element? - HTML-CSS
From what I could find on MDN, it's not particularly common to require the / for self-closing elements. Further to my confusion, ...
Read more >How to setup self-closing when I save code on VSCode with ...
However I know that some part of the community really dislikes this feature since it often closes components that you don't want to...
Read more >React Has Been Teaching You Invalid HTML! - Hashrocket
You can self-close these elements (e.g. <hr /> ), meaning - no additional closing tag is necessary (and adding one is generally considered ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
React and Vue works perfectly with self closing components, so that’s not so impossible as you guys are saying.
Write something like
<my-comp atr="atr" />
is easier then<my-comp atr="atr"></my-comp>
, isn’t?But ok
¯\_(ツ)_/¯
I don’t get this argument. Angular already uses asterisks, brackets and other stuff in their templates. This isn’t valid HTML5 as well. So why not support self closing tags? Angular templates are not HTML, it’s angular template language.