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(types): adapt type definition of dataOrUpdater in setQueryData #540

Merged
merged 1 commit into from
Jun 2, 2020
Merged

Commits on Jun 2, 2020

  1. fix(types): adapt type definition of dataOrUpdater in setQueryData

    since the updater receives `T | undefined`, it is difficult to construct a `T` from that. oldData can legitimately be `undefined`, but since `getQueryData` can also return `undefined` at any point, it makes more sense to have the updater be able to return `undefined` as well, which also means that `data` itself can be `undefined`
    TkDodo committed Jun 2, 2020
    Configuration menu
    Copy the full SHA
    2533c93 View commit details
    Browse the repository at this point in the history