[Beta] Learn About Self-Closing JSX Tags #16710
Labels
help wanted
Open for all. You do not need permission to work on these.
scope: curriculum
Lessons, Challenges, Projects and other Curricular Content in curriculum directory.
Challenge Name
Learn About Self-Closing JSX Tags
Issue Description
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.
Item was rendered on the preview when receiving this error.
Appears it is being rendered not with challenge-node id but instead root id.
Added code:
ReactDOM.render(JSX, document.getElementById('challenge-node'));
Tests passed and now it renders twice on the preview.
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.
Solution:
Need to add directions to render to the DOM and remove the current preview.
Or need to adjust the preview to be off of the challenge-node instead of the root id.
Or there is another solution that I can not currently think of.
Your Code
The text was updated successfully, but these errors were encountered: