Im trying to learn react but I cannot get my program to compile. When I run my code, it says it fails to compile and says that state is not defined. I followed what was on the react website for setting the state, but it still says it is not defined. Ive searched all over online and it says this is how state should be set up. Please help!
const App = () => {
state = {name: "Jim"};
return (
<Profile name={this.state.name} />
);
}