acdlite d2a2a66614 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.

DiffTrain build for commit https://github.com/facebook/react/commit/60a927d04ad3888facebcdf7da620aa1cfc9528f.
2024-01-14 02:42:09 +00:00
2023-02-20 16:27:42 +00:00
S
Description
Languages
JavaScript 67.1%
TypeScript 29.4%
HTML 1.5%
CSS 1.1%
C++ 0.6%
Other 0.2%