mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
60a927d04a
This fixes a bug that happened when the canonical value passed to useOptimistic without an accompanying call to setOptimistic. In this scenario, useOptimistic should pass through the new canonical value. I had written tests for the more complicated scenario, where a new value is passed while there are still pending optimistic updates, but not this simpler one.