Capítulo 79 de 116
Component is the base class the pre-Hooks class-component API extends — the docs treat class components as a legacy pattern to understand for maintaining existing code, not the recommended way to write new components (function components + Hooks is the modern default).
this.state/this.setState ↔ useState, componentDidMount/componentDidUpdate/componentWillUnmount ↔ useEffect, and so on. New code should default to function components.constructor (initialize this.state), render() (return JSX, must stay pure like a function component's body), componentDidMount/componentDidUpdate/componentWillUnmount (side effects, roughly mapping to Ch 36's Effect model but split across three separate methods instead of one Effect + cleanup).static getDerivedStateFromError() and componentDidCatch() have no Hook equivalent — a component that needs to catch rendering errors in its subtree currently must be a class component (see the error-boundaries ESLint rule, Ch 47, which checks this pattern is implemented correctly).this binding gotchas: class methods used as event handlers need explicit binding (constructor .bind(this), or class-field arrow-function syntax) to have the correct this when called — a category of bug that doesn't exist in function components/Hooks at all.this-binding bugs are a class-component-specific footgun that Hooks-based components simply don't have.this.state/lifecycle methods.