[Beta] Learn About Self-Closing JSX Tags #16710
Removed the comments and closed the tags (Missed the br tag on first attempt failed then fixed) and then attempt failed but then the item rendered on the page.
Fail was from: The provided JSX element should render as is to the DOM node with id of challenge-node.
The Challenge states:
It does not mention needing to attach it to the DOM and seems to indicate you only need to adjust the line-break and the horizontal-line.
Failed: const JSX = ( <div> <h2>Welcome to React!</h2><br /> <p>Be sure to close all tags!</p> <hr /> </div> ); Passed: const JSX = ( <div> <h2>Welcome to React!</h2><br /> <p>Be sure to close all tags!</p> <hr /> </div> ); ReactDOM.render(JSX, document.getElementById('challenge-node'));
The text was updated successfully, but these errors were encountered:
Thank you for reporting the issue! I don't believe we should add directions to render the component to the DOM.
It would be inconsistent with the behaviors of all of the other React DOM element challenges. For example, in the challenge before, Define an HTML Class in JSX, no
@TJBarrettJR the reason why adding a