React Use State

Guide for correct useState and useReducer usage in React. Use when writing or reviewing state management code — especially for derived state, initializing state from props, functional updaters, one-time initializations, choosing between useState and useReducer, or when syncing state with useEffect (which is usually wrong).

catesandrew Updated 1 repo stars

File contents

catesandrew/skills commit 7b7cae9154

Frequently asked questions

npx get-skill add catesandrew/react-use-state