Skip to content

Releases: TanStack/query

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>
  )}
>

v2.0.4

24 Jun 16:42
Compare
Choose a tag to compare

2.0.4 (2020-06-24)

Bug Fixes

  • refetchOnWindowFocus: stale queries are no longer refetched (c3e42c4)

v2.0.3

23 Jun 02:04
ebbf1a8
Compare
Choose a tag to compare

2.0.3 (2020-06-23)

Bug Fixes

  • remove unused wasPrefetched (ebbf1a8)