question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

self closing components? <cmp />

See original GitHub issue

Will there be self closing components this time around? <custom-element />

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:6
  • Comments:21 (14 by maintainers)

github_iconTop GitHub Comments

8reactions
diogobernardellicommented, Feb 6, 2019

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 ¯\_(ツ)_/¯

5reactions
benneqcommented, Mar 24, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found