Tell us what’s happening:
React: Write a React Component from Scratch :Uncaught ReferenceError: exports is not defined:
My code so far
// change code below this line
import React from 'react';
class MyComponent extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h1>My First React Component!</h1>
</div>
);
}
};
export default MyComponent;
ReactDOM.render(
<MyComponent/>,
document.getElementById('root')
);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
.
Challenge: Write a React Component from Scratch
Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/react/write-a-react-component-from-scratch