Tell us what’s happening:
I’m pretty sure my code is correct, however I keep getting the following error:
“Uncaught TypeError: Super expression must either be null or a function”
Your code so far
// change code below this line
class MyComponent extends React.Compontent{
constructor(props){
super(props);
}
render() {
return (
<div>
<h1>My First React Component!</h1>
</div>
)
};
};
ReactDOM.render(<MyComponent/>, document.getElementById('challenge-node'));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36.
Challenge: Write a React Component from Scratch
Link to the challenge:
Can’t post link so have just included the extension to the ffc website:
/learn/front-end-libraries/react/write-a-react-component-from-scratch
