Nesting Elements
Nesting Elements
👨💼 See if you can figure out how to write the JavaScript + React code to
generate this DOM output:
<div class="container">
<span>Hello</span>
<span>World</span>
</div>
Hint: You can either use the
children prop or additional arguments after the
props. If you use the children prop, you will get a warning in the developer
console about needing a "key" prop. We'll get to that later.Tip: You'll use
createElement for the span elements, but to get the
space between them, you'll need to use a string (' ') to tell React to create
a textNode.