0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

5,191 commits

Author SHA1 Message Date
Sergey Falinsky
60103355bf
docs: fix a typo (#1833) 2021-02-21 14:05:56 +01:00
Tanner Linsley
7e98e1ca3c fix: do not attempt to use global for context sharing v3.9.8 2021-02-16 16:51:31 -07:00
Ihab Khattab
20b653f6d2
docs: Update persistQueryClient.md (#1791) v3.9.7 2021-02-15 23:39:30 -07:00
Tanner Linsley
19e07237ce
fix: cross-module react query context (#1805)
* fix: cross-module react query context

* ditch the node types for simplicity and ignore `global` for now
2021-02-15 23:38:42 -07:00
Niek
ff619d061f test: add test for infinite queries and suspense 2021-02-15 13:24:55 +01:00
Niek
2bcc893255 test: add ssr test for infinite queries 2021-02-15 08:31:45 +01:00
Niek
8a613165fc fix: make sure suspense callbacks get correct data v3.9.6 2021-02-14 16:26:25 +01:00
Niek Bosch
b124ca8a42
fix: string and array query keys should be similar (#1799) v3.9.5 2021-02-14 14:27:05 +01:00
Niek
7906ce786f fix: prevent fetch when switching to disabled query v3.9.4 2021-02-14 08:44:41 +01:00
Niek
dbd3b616fa fix: use correct query and options when creating infinite query result v3.9.3 2021-02-13 17:47:58 +01:00
Tanner Linsley
131eb29a82
fix(experimental): persistQueryClient and persistors (#1789) v3.9.2
* fix(experimental): refactor to persistQueryClient and persistor interfaces

* clean up basic example
2021-02-12 16:53:29 -07:00
Tanner Linsley
abd7f86ed1 fix: useLocalStorage dependency array v3.9.1 2021-02-12 15:59:07 -07:00
Tanner Linsley
627560ff8b fix: useEffect is now defined
Fixes #1787
2021-02-12 15:57:37 -07:00
Niek Bosch
f9f9cce852
fix: queries should not end up in an error state when a component unmounts (#1781) v3.9.0 2021-02-12 13:44:55 -07:00
Niek Bosch
4a821b0f1f
feat: add support for concurrent mode (#1775) 2021-02-12 13:42:23 -07:00
Pepijn Senders
aebc5553d9
fix: devtools hydration error (#1727) 2021-02-12 13:08:31 -07:00
phatmann
1f6fcefca1
docs: Update window-focus-refetching.md (#1672) 2021-02-12 13:07:18 -07:00
Florian
f6aaa85748
docs: fixes fetch example which throws error (#1742) 2021-02-11 14:50:33 +01:00
Pascal Wegner
f65623f18e
docs: fix hook testing example (#1698) v3.8.3 2021-02-11 14:38:01 +01:00
Caleb Lovell
4aed54eb88
docs: update useInfiniteQuery (#1746) 2021-02-11 14:02:07 +01:00
Caleb Lovell
10629eb5e9
docs: add data structure note and another example (#1748) 2021-02-11 14:00:37 +01:00
Caleb Lovell
8292aae62f
docs: add default query function reference (#1747)
I was confused what that meant when I first started. Added a link to the end to help
2021-02-11 13:57:19 +01:00
Mohamed Ayoub Zahir
4e3aebf81a
docs: fix typo (#1763) 2021-02-11 13:51:12 +01:00
Jason O'Neill
1f05a3bc9d
docs(useQuery): add retryOnMount option (#1777)
* docs(useQuery): add retryOnMount option

* docs(useQuery): add missing comma
2021-02-11 09:46:51 +01:00
Niek Bosch
c921585fd7
fix: handle select errors (#1760) 2021-02-09 09:12:07 +01:00
Tanner Linsley
6182360c81 chore: allow next releases 2021-02-08 13:12:08 -07:00
Tanner Linsley
862bb2be3a docs: fix SSR docs
Closes #1762
2021-02-08 09:26:29 -07:00
Niek Bosch
3d2806edb4
fix: stop fetching pages when an infinite query unmounts (#1761) v3.8.2 2021-02-07 14:48:41 +01:00
Niek Bosch
0b8c55c3a6
fix: single query methods should be exact by default (#1756) v3.8.1 2021-02-06 20:15:18 +01:00
Niek Bosch
2da342cde9
fix: update synchronously to make sure observers always have the latest state (#1757) v3.8.0 2021-02-06 19:39:38 +01:00
Niek Bosch
bd6c2b5416
feat: run selector if reference changes to enable use of dependencies (#1751) 2021-02-06 19:38:37 +01:00
Niek Bosch
7c08f330ec
fix: check if the navigator global is available before usage (#1755) 2021-02-06 19:38:10 +01:00
Niek Bosch
5bd3fa973b
fix: make sure state is not updated when unmounted (#1758) 2021-02-06 19:37:44 +01:00
Niek
79e1c17cbb test: add infinite query with initial data test 2021-02-06 16:07:58 +01:00
Niek Bosch
8e24ebdec1
fix: accept null values in mutate function (#1740) v3.7.1 2021-02-04 10:16:08 +01:00
Ashwin Gokhale
216453059f
feat(types): Add optional cancelRefetch field to ResultOptions interface (#1663) v3.7.0
* feat(types): Add optional cancelRefetch field to ResultOptions interface

* feat(docs): Add cancelRefetch documentation for the refetch function
2021-02-04 09:53:44 +01:00
Niek Bosch
397d8b71eb
fix: notify on updates between mounting and subscribing (#1737) v3.6.1 2021-02-04 08:50:29 +01:00
Mateusz Ciezczak
1032804426
chore(examples): update axios version in examples folder (#1679) 2021-02-02 19:35:23 +01:00
Rene Dellefont
003345d735
docs (useQuery): add some missing items to api (#1707)
The useQuery reference was missing some return value documentation as well as some option values.
2021-02-02 19:34:09 +01:00
siddtheone
bae0f7e851
docs: Adding missing config property (#1673)
From documentation below it seems, code example missing `mutationKey`
2021-02-02 19:32:41 +01:00
Chai
3840f290a2
docs: fix typo and links (#1683)
* docs(focusManager): typo

setFocsued -> setFocused

* docs(*): fix links

change #useInfiniteQuery to /reference/useInfiniteQuery
change #usequery to /reference/useQuery
2021-02-02 19:30:43 +01:00
Derrick Bol
ce6756bf61
docs: Fix broken link to query-keys docs (#1719) 2021-02-02 19:29:17 +01:00
Niko
ed846c5baa
Update QueryClient.md (#1686) 2021-02-02 19:01:49 +01:00
Todd Matthews
5a28846d08
Update queries.md (#1716) 2021-02-02 18:59:30 +01:00
Arthur Budko
93f515c5d3
docs: fix links in initial-query-data.md (#1723) 2021-02-02 18:58:18 +01:00
Tanner Linsley
7bab9534cf docs: use sponsors iframe 2021-01-27 21:33:01 -07:00
Rene Dellefont
813d70f659
docs: add v2 docs links (#1676)
* docs: add v2 docs links

* revert (partial): docs: add v2 docs links

This partially reverts commit 48c40e387a - reverting docs Nav only.

* docs: add v2 docs link to home page banner.
2021-01-22 18:41:38 +01:00
Dominik Dorfmeister
39691a739b
feat: use tracked query (#1578) v3.6.0
* 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
2021-01-22 05:05:47 -07:00
Dominik Dorfmeister
ead2e5dd52
fix(query): transition to error state when keepPreviousData is true (#1665)
closes #1659
2021-01-17 13:43:28 -07:00
Tanner Linsley
eb3d700dc5
fix(hydration): useMemo for hydrating again v3.5.16 2021-01-17 09:11:30 -07:00