Self closing tags can lead to unexpected behaviour
https://www.stefanjudis.com/today-i-learned/self-closing-tags-are-mostly-meaningless-in-html
Void elements [MDN] like
hr
,br
,input
: self-closing doesn't do anythingNon-void elements like
div
: HTML pretends the/>
is>
- so it's as if you forgot to close your div! 🤯
React doesn't have that problem