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

add keepLatest util #573

Merged
merged 1 commit into from
Aug 4, 2022
Merged

add keepLatest util #573

merged 1 commit into from
Aug 4, 2022

Commits on Aug 4, 2022

  1. feat: new util -- keepLatest

    A utility decorator for smoothing out changes in upstream data between
    refreshes / reload.
    
    when using [[RemoteData]] (or some other promise-based "eventually a value" resource),
    the value returned from the API is what's useful to see to users. But if the URL
    changes, the remote request will start anew, and isLoading becomes true, and the value
    is falsey until the request finishes. This can result in some flicker
    until the new request finishes.
    
    To smooth that out, we can use [[keepLatest]]
    NullVoxPopuli committed Aug 4, 2022
    Configuration menu
    Copy the full SHA
    3e3d02c View commit details
    Browse the repository at this point in the history