React render component

Hi, welcome to the forum.

First of all, please don’t post pictures of code - please cut and paste it into the thread. I will provide info below on formatting.

Secondly, please always provide a link to the challenge - we don’t have them memorized.


When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

But just looking at it, I notice that you added the id of “challenge-node” into your JSX. I assume that you weren’t supposed to do that. That will happen in your html file (which you can’t see right now).

1 Like

I think the id should be passed to the DIV element there,
as the react works through the single wrapper for all the statements

instead of rendering the id of the div’s child, make id for the wrapping dive and then try it

That’s not how these are usually set up. The wrapper div that React renders to is hidden at this point. They’re just trying to get them to create a root JSX node. I could confirm that if the OP had included a link.

Any attribute on the elements or any change to the text will make the test fail as it is doing a string comparison to the innerHTML.


Even though adding the id on one of the elements isn’t correct it won’t break the render as the element already in the DOM with the challenge-node id is the parent element and that id will be found before the id on any of the child elements.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.