Fix: useOptimistic should return passthrough value when there are no updates pending (#27936)
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.
A
Andrew Clark committed
60a927d04ad3888facebcdf7da620aa1cfc9528f
Parent: 33068c9
Committed by GitHub <noreply@github.com>
on 1/14/2024, 2:37:35 AM