Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: useOptimistic should return passthrough value when there are no updates pending #27936

Merged
merged 1 commit into from
Jan 14, 2024

Commits on Jan 14, 2024

  1. Fix: useOptimistic returns passthrough when nothing pending

    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.
    acdlite committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    4e99264 View commit details
    Browse the repository at this point in the history