Write a React Component from Scratch.Solution

Write a React Component from Scratch.Solution
0

#1

Tell us what’s happening:
Where is my wrong?

Your code so far


// change code below this line
class MyComponent extends React.Component{
    render(){
        return(
            <h1>My First React Component!</h1>
        )
    }
}
ReactDOM.render(<MyComponent />,document.getElementById ('challenge-node'));

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/write-a-react-component-from-scratch/


#2

ReactDom should be ReactDOM.

You also misspelled “Component” inside the <h1> tags.


#3
class MyComponent extends React.Component{
    render(){
        return(
            <h1>My First React Componet!</h1>
        )
    }
}
ReactDOM.render(<MyComponent />,document.getElementById ('challenge-node'));

I change it but again I have got that wrong :
// running test
MyComponent should contain an h1 tag with text My First React Component! Case and punctuation matter.
// tests completed


#4

In the <h1> tags, Componet should be Component


#5

Ohh yes :grinning::grinning: This is right Thank you helping