Tags: flybayer/react-query
Tags
fix: stop fetching pages when an infinite query unmounts (TanStack#1761)
fix: single query methods should be exact by default (TanStack#1756)
fix: update synchronously to make sure observers always have the late… …st state (TanStack#1757)
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)
PreviousNext