React 36 ⚛️ Extracting Reusable Logic into Custom Hooks
React components often accumulate logic that has nothing to do with rendering. A component that fetches data, subscribes to a browser event, and manages a form field is doing three jobs at once. The rendering logic — the JSX — is buried under layers of state declarations and effect callbacks. Custom Hooks exist to pull…