Skip to content

Releases: TanStack/query

v1.5.10

28 Jun 19:51
5d6e86a
Compare
Choose a tag to compare

1.5.10 (2020-06-28)

Bug Fixes

  • setQueryData: setQueryData(notInstantiatedQueryKey) now assigns Promise.resolve() instead of new Promise(noop) that caused a never ending promise en certain scenarios. Ref bug #639 (#645) (5546670)

v2.4.2

27 Jun 05:58
db5a51e
Compare
Choose a tag to compare

2.4.2 (2020-06-27)

Bug Fixes

  • query-cache: Prevent re-run of query for refetch interval if update is disabled (#640) (db5a51e), closes #635
  • disabling query in suspense mode (#643) (53e8424)

v2.4.1

27 Jun 01:22
Compare
Choose a tag to compare

2.4.1 (2020-06-27)

Bug Fixes

  • useMutation: ensure all side-effects are always called (5a5ad74), closes #249 #641

v2.4.0

25 Jun 16:41
Compare
Choose a tag to compare

2.4.0 (2020-06-25)

Features

  • add initialStale option to queries (d7048d1)

v2.2.3

25 Jun 05:20
4712c0d
Compare
Choose a tag to compare

2.2.3 (2020-06-25)

Bug Fixes

v2.2.2

25 Jun 01:38
Compare
Choose a tag to compare

2.2.2 (2020-06-25)

Bug Fixes

  • prefetchQuery: add prefetchQuery(key, options) overload (0054f7f)

v2.2.1

24 Jun 23:20
Compare
Choose a tag to compare

2.2.1 (2020-06-24)

Bug Fixes

  • queryKeySerializer now in the right spot of the config (a68dc28)

v2.2.0

24 Jun 22:51
Compare
Choose a tag to compare

2.2.0 (2020-06-24)

Bug Fixes

  • call onSuccess for all query instances (c9afbc9)
  • call onSuccess for all query instances on (a05cb50), closes #629
  • don't schedule garbage collection unnecessarily (#627) (1e1e0f6)

Features

  • add default quernFn option (2a31f8d)

v2.1.1

24 Jun 18:01
Compare
Choose a tag to compare

2.1.1 (2020-06-24)

Bug Fixes

  • query.state.isFetching defaults to the loading status, despite lack of data (fd280ec), closes #624

v2.1.0

24 Jun 17:48
Compare
Choose a tag to compare

2.1.0 (2020-06-24)

Bug Fixes

  • suspense boundaries now catch query errors accurately

Features

  • added queryCache.resetErrorBoundaries (4c741f7)

Whether you are using suspense or useErrorBoundaries in your queries, you will need to know how to use the queryCache.resetErrorBoundaries function to let queries know that you want them to try again when you render them again.

How you trigger this function is up to you, but the most common use case is to do it in something like react-error-boundary's onReset callback:

import { queryCache } from "react-query";
import { ErrorBoundary } from "react-error-boundary";

<ErrorBoundary
  onReset={() => queryCache.resetErrorBoundaries()}
  fallbackRender={({ error, resetErrorBoundary }) => (
    <div>
      There was an error!
      <Button onClick={() => resetErrorBoundary()}>Try again</Button>
    </div>
  )}
>