Skip to content

Tags: CalebLovell/react-query

Tags

v3.7.1

Toggle v3.7.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: accept null values in mutate function (TanStack#1740)

v3.7.0

Toggle v3.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat(types): Add optional cancelRefetch field to ResultOptions interf…

…ace (TanStack#1663)

* feat(types): Add optional cancelRefetch field to ResultOptions interface

* feat(docs): Add cancelRefetch documentation for the refetch function

v3.6.1

Toggle v3.6.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: notify on updates between mounting and subscribing (TanStack#1737)

v3.6.0

Toggle v3.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: use tracked query (TanStack#1578)

* feat: useTrackedQuery

add useTrackedQuery hook, which tracks notifyOnChangeProps automatically via a Proxy

* feat: notifyOnChangeTracked

different approach to tracking used props by using an option rather than a new hook, so that we can also easily combine this with useInfiniteQuery; also, using Object.defineProperty rather than a Proxy

* feat: notifyOnChangeTracked

add some documentation for notifyOnChangeTracked

* feat: notifyOnChangeTracked

add a test for notifyOnChangeTracked

* feat: notifyOnChangeTracked

keep trackedProps separate from notifyOnChangeProps and only merge them in shouldNotifyListeners

* feat: notifyOnChangeTracked

store tracked result object on queryObserver instance so that the reference stays the same between renders

* feat: notifyOnChangeTracked

create a new trackedResult whenever we create a new result
this ensures that we keep referential identity of the tracked result object if nothing changes, but still get a new instance if we need to (to avoid stale closure problems)

* feat: notifyOnChangeTracked

add test for referential stability between re-renders; even if we are tracking changes, we should return the same object if we re-render (for some other reason than react-query changes) and nothing has changed

* feat: notifyOnChangeTracked

rename trackedResult to trackedCurrentResult

* feat: notifyOnChangeTracked

combine notifyOnChangeTracked with notifyOnChangeProps

* feat: notifyOnChangeTracked

remove auto-resetting of tracked props, which means that every prop ever tracked will lead to a re-render; this is the "safe" side - we'd rather have an unnecessary re-render rather than a bug because we are not re-rendering when something is observed only in an effect

* feat: notifyOnChangeTracked

always re-render if we are tracking props, but not using any. In that case, trackedProps will be an empty array, which would lead to no re-renders at all (same as setting notifyOnChangeProps to empty Array)

* feat: notifyOnChangeTracked

conditionally create trackedResult - we don't need it if we are not actually tracking props

* feat: notifyOnChangeTracked

add a test for combining notifyOnChangeProps: 'tracked' and notifyOnChangePropsExclusion

* feat: notifyOnChangeTracked

update docs

v3.5.16

Toggle v3.5.16's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix(hydration): useMemo for hydrating again

v3.5.15

Toggle v3.5.15's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: stop returning cancelledError on reset during fetch (TanStack#1660)

* fix: stop returning cancelledError on reset during fetch

* test: stop returning cancelledError on reset during fetch

v3.5.14

Toggle v3.5.14's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
docs: clarify setting cacheTime for persistWithLocalStorage to work p…

…roperly (TanStack#1612)

v3.5.13

Toggle v3.5.13's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix(onlineManager): listen to 'offline' events (TanStack#1656)

Fixes TanStack#1654

v3.5.12

Toggle v3.5.12's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
docs: mention query options strictly for useQuery (TanStack#1609)

* docs: mention query options strictly for useQuery

This is in accordance with issues faced when trying use certain query options in `prefetchQuery` and `prefetchInfiniteQuery`. I opened a [discussion](TanStack#1596) and was [suggested](TanStack#1596 (reply in thread)) to open a PR to mention/describe the options available.

* Update QueryClient.md

* docs: fixed link to `useQuery` in `QueryClient`

made changes as suggested in TanStack#1609 (comment)

v3.5.11

Toggle v3.5.11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix(devtools): Added type attribute to all button elements (TanStack#…

…1581)

Adding type attribute tells browser what type of button it is. For most browsers the default type of button is submit. This causes a full page post back in older legacy server rendered frameworks like asp.net webfo