You add a search box to a todo list. todos is state, filter is state, and — because the filtered list "depends on" both — you add a third state variable, visibleTodos, and a useEffect that recalculates it whenever todos or filter changes. It works. Then, months later, someone adds a bulk "complete all" button that updates todos directly, and the... Weiterlesen
Intelligence View
⚡ tsecurity.de Intelligence
React Derived State: Why That useState Is Probably a Bug
Reagiere als Erste:r — dein Feedback zählt!
SOCIAL SHARE CARD GENERATOR