You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
344 B
15 lines
344 B
11 years ago
|
---
|
||
|
id: self-closing-tag
|
||
|
title: Self-Closing Tag
|
||
11 years ago
|
layout: tips
|
||
11 years ago
|
permalink: self-closing-tag.html
|
||
11 years ago
|
prev: if-else-in-JSX.html
|
||
11 years ago
|
next: maximum-number-of-jsx-root-nodes.html
|
||
11 years ago
|
---
|
||
|
|
||
11 years ago
|
In JSX, `<MyComponent />` alone is valid while `<MyComponent>` isn't.
|
||
11 years ago
|
|
||
11 years ago
|
> Note:
|
||
|
>
|
||
|
> Every React component can be self-closing: `<div />`. `<div></div>` is also an equivalent.
|