king77
1
Tell us what’s happening:
Your code so far
// change code below this line
class MyComponent extends React.Component{
constructor(props){
super(props);
}
render(){
return(
<div>
<h1>My First React Component!</h1>
</div>
);
};
};
ReactDOM.render(<MyComponent />, ('challenge-node'));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
.
Link to the challenge:
if this is a html tag then it needs to have a begin <> as well in HTML you alway start with <> and end with </> without a space
king77
3
There are no child elements that is why I used < /> JSX… instead of the html <></>
On the last line, ReactDOM.render, you forgot to add document.getElementById
before ('challenge-node')
so it should look like this:
ReactDOM.render(<MyComponent />, document.getElementById('challenge-node'));
4 Likes
lasjorg
5
1 Like