Tags: CalebLovell/react-query
Tags
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
fix: notify on updates between mounting and subscribing (TanStack#1737)
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
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
docs: clarify setting cacheTime for persistWithLocalStorage to work p… …roperly (TanStack#1612)
fix(onlineManager): listen to 'offline' events (TanStack#1656) Fixes TanStack#1654
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)
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
PreviousNext