I am trying to work out the difference between a React Stateful component and a stateless component.
Correct me if I'm wrong:
So, this is a Stateful Component:
import React from "react";
export class Mycomponent extends React.Component {
render() {
return (
<div>
<p>My Component</p>
</div>
);
}
}
and how would a stateless component be different to the one above?