Introduction: The Misunderstood Hook
React 19 has introduced several powerful primitives, but perhaps none are as frequently misunderstood as useOptimistic . When developers first encounter it, the temptation is to treat it as a new, lightweight state management solution—a replacement for local useState calls when handling form submissions.
This is a mistake. If you treat useOptimistic as a general-purpose state management tool, you will encounter flickering, inconsistent UI states, ...