Use Old School State
A tutorial on creating a custom React hook that mimics the callback functionality of the old setState method from class components.
A tutorial on creating a custom React hook that mimics the callback functionality of the old setState method from class components.
Explains how React's useState hook updates state asynchronously and demonstrates correct patterns for consecutive updates.
A guide to common pitfalls when using React Hooks, including conditional invocation and stale closures, with practical solutions.
Explains React useState pitfalls when initializing state with props, using a person detail form example to demonstrate the issue.
A reference guide covering the basics of React Hooks, including useState, useEffect, useRef, useContext, and useReducer.
Learn how to implement a callback function after state updates with React's useState hook, using useEffect or a custom hook.
Common pitfalls and best practices for using React's useState hook, focusing on avoiding unnecessary state for derived values.
Explains the advanced React useState features: lazy initialization for expensive state and function updates for reliable state changes.
Explains the three primary ways to manage state in React applications: locally, parentally, and remotely.
A guide on how to derive state from props in React function components, including code examples for initializing and updating state.
Explains how to implement computed properties (derived state) in React using useState and sorting examples.
A tutorial on updating items in a React list using state management, including useState and useReducer hooks.
A tutorial on adding items to a list in React using the useState Hook and controlled input fields.
A tutorial on removing items from a list in React using state management and the filter method.
An in-depth look at how React Hooks like useState and useEffect work by building a simplified React engine from scratch.
A guide to refactoring React state management by replacing multiple useState hooks with a single useReducer hook for a form-based calculator.
Three essential rules for designing and managing state effectively in React functional components, focusing on single responsibility and complexity extraction.
A comparison of React's useState and useReducer hooks, explaining their trade-offs and when to use each through practical examples.
A comprehensive guide to using the React useState() hook, covering initialization, reading, updating state, common pitfalls, and best practices.
A comprehensive guide to understanding and managing state in React, from local component state with hooks to global state solutions.