Connor Davis

@connordav.is

I would recommend always closing tags.

January 20th 2018

I would recommend always closing tags. It’s an easy thing to remember. When you delve into Javascript and JSX you realize that void tags MUST be closed to be valid. This makes sense because developer defined components can be void elements as well. For example a header component:

<div id=”app”>

<Header />

<h1>Hello World!<h1>

</div>

It’s also a pain if you copy someone’s html into a JSX component and there’s a bunch of unclosed elements that cause errors.