I\'m new to React and I\'m trying to figure out the purpose/use of
In React's JSX, you only need to write when the component has child components, like this:
If there is nothing between and , then you can write it either or (but is generally preferred). Details in Introducing JSX.
Just as a side note, you'd access those children in your component via the special props.children property. More in JSX in Depth: Children in JSX.
Note that this is very much not like HTML or XHTML. It's its own (similar) thing with different rules. For instance, in HTML, is exactly the same thing as ), they cannot be self-closing. In JSX (and XHTML), they can be.br or img) can be written with or without / before > and they never get an ending tag, but non-void elements (like div) must always have an ending tag (