React Class Components → React Hooks (Function Components)
mediumClass components still work in React 19, but no new React features target them. Hooks are idiomatic. Migration is straightforward but time-intensive for large codebases.
this.state = {} → const [value, setValue] = useState(). this.setState({ key: val }) → setValue(val).
componentDidMount + componentDidUpdate → useEffect with dep array. componentWillUnmount → return cleanup function from useEffect.
Class methods → plain functions or callbacks inside the function component. Bind is no longer needed.
static contextType → useContext(MyContext). this.context.value → const value = useContext(MyContext).
Repeated logic across components → custom useXxx hooks. Replaces mixins and HOC patterns.
PureComponent → React.memo(Component) for the same shallow-comparison optimization.