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 component tags

See original GitHub issue

How about allowing self-closed component tags like <my-component />? Currently, it does not work.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

32reactions
yyx990803commented, Jul 11, 2015

Vue templates need to be valid HTML. There are no “self closing tags” in HTML5, it’s an XHTML syntax which is now outdated and you should never use it. See http://stackoverflow.com/questions/3558119/are-self-closing-tags-valid-in-html5

11reactions
fnlctrlcommented, Dec 13, 2016

@harbulot FYI self-closing tags works in 2.0 as long as you don’t use in-dom templates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
React component closing tag - Stack Overflow
The purpose of self-closing tags is simply the fact that it is more compact. This is especially useful when said component doesn't have...
Read more >
Self-closing component tags (<my-comp/> instead of ... - GitHub
There is an existing issue for this, #673, but it was closed due to inactivity. That issue got half-rejected (it was not resolved)...
Read more >
List of HTML Self-Closing Tags - Xah Lee
Last updated: 2022-03-15 . Here is a complete list of self-closing tags for HTML5. These are called void-elements in HTML spec. <area ...
Read more >
Self-closing tags - HTML - Simple Dev
A self-closing tag is made of an element's symbol wrapped in angle brackets. It does not require a forward slash. Elements that use...
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