1
ReactIntermediate#debugging
Function components with hooks are the standard: less boilerplate, easier logic reuse and better minification. Class components use this, lifecycle methods and are still needed only for error boundaries.
// function
function C(){ const [n,setN] = useState(0); return <b>{n}</b>; }
// class
class C extends React.Component { state = { n: 0 }; render(){ return <b>{this.state.n}</b>; } }