0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

606 commits

Author SHA1 Message Date
Wonsuk Choi
ddff3a70be
fix(examples/react/react-native): register 'NetInfo' through 'onlineManager.setEventListener' so connected devices are not treated as offline while reachability is unknown (#12091) 2026-10-18 23:02:32 +09:00
Wonsuk Choi
85feb09419
refactor(examples/react/react-native): refetch only active stale queries in 'useRefreshOnFocus' as in the React Native guide (#12092) 2026-10-18 23:02:22 +09:00
Wonsuk Choi
3c648e4dd8
feat(examples/react/react-native): render 'ReactQueryDevtools' on web through a platform-specific 'Devtools' component (#12093) 2026-10-18 23:01:44 +09:00
Wonsuk Choi
a8eeff39fe
refactor(examples/react/react-native): replace the deprecated 'Paragraph' and 'Title' with 'Text' variants from 'react-native-paper' (#12094) 2026-10-18 23:01:33 +09:00
Wonsuk Choi
af1e58044a
refactor(examples/react/eslint-plugin-demo): rename the 'useApiClient' stub to 'getApiClient' since it is called outside of hooks (#12089) 2026-10-18 22:28:44 +09:00
Wonsuk Choi
c57cf557c1
refactor(examples/react/basic): remove the always-true 'enabled' and the always-false '!postId' check in 'Post' (#12088) 2026-10-18 22:28:38 +09:00
Wonsuk Choi
e39f330fa3
fix(examples/react/basic-graphql-request): type post ids as strings and pass the id as a GraphQL variable (#12087) 2026-10-18 22:28:32 +09:00
Wonsuk Choi
988e69ebfd
fix(examples/react/algolia): show the search error and use a 'button' that is disabled while fetching for loading more (#12086) 2026-10-18 22:28:25 +09:00
Wonsuk Choi
0fba30fbea
fix(examples/react/load-more-infinite-scroll): move the projects query into 'infiniteQueryOptions' in 'src/lib' and type 'nextId' and 'previousId' as nullable (#12085) 2026-10-18 22:28:18 +09:00
Wonsuk Choi
7328d02a36
fix(examples/react/pagination): share the projects query with 'queryOptions' in 'src/lib' so the next page prefetch respects 'staleTime' (#12084) 2026-10-18 22:28:11 +09:00
Wonsuk Choi
d338489e0a
fix(examples/react/playground): show 'Saved!' only after a successful mutation instead of while idle (#12083) 2026-10-18 22:28:05 +09:00
Wonsuk Choi
f0dcdca510
fix(examples/react/offline): show query errors in 'List' and 'Detail' and remove the 'MovieError' element that 'react-location' never renders (#12082) 2026-10-18 22:27:59 +09:00
Wonsuk Choi
3ff2ec1678
fix(examples/react/nextjs-app-optimistic-updates): stream the prefetched todos with 'useSuspenseQuery' and a 'React.Suspense' boundary (#12081) 2026-10-18 22:27:53 +09:00
Wonsuk Choi
cd9e573ea9
fix(examples/react/nextjs): set a default 'staleTime' so the statically generated posts are not refetched right after hydration (#12077) 2026-10-18 22:27:27 +09:00
Wonsuk Choi
9d93dc57d1
refactor(examples/react/nextjs-app-prefetching): add 'shouldRedactErrors' to the query client as in the advanced SSR guide (#12076) 2026-10-18 22:27:20 +09:00
Wonsuk Choi
daf7444f91
fix(examples/react/prefetching): show the error instead of an empty list or blank details when fetching characters fails (#12075) 2026-10-18 22:27:14 +09:00
Wonsuk Choi
19ad6d7fd4
fix(examples/react/nextjs): show the error in 'PostList' instead of an empty list when fetching posts fails (#12074) 2026-10-18 22:27:08 +09:00
Wonsuk Choi
d3aac58fbd
docs(examples/react/prefetching): replace the unreachable '[user]/[repo]' page with a character details page that reads the prefetched query (#12073) 2026-10-18 21:01:44 +09:00
Wonsuk Choi
2e7c288ed2
refactor(examples/react/shadow-dom): type the dogs response and move the query into 'api.ts' with 'queryOptions' (#12072) 2026-10-18 21:01:16 +09:00
Wonsuk Choi
0a37fa6f23
refactor(examples/react/nextjs-app-optimistic-updates): share the todos query and fetchers with 'queryOptions' (#12071) 2026-10-18 21:00:55 +09:00
Wonsuk Choi
5b7f490130
refactor(examples/react/prefetching): type the character query and share it with 'queryOptions' (#12070) 2026-10-18 14:09:05 +09:00
Wonsuk Choi
090fb4a417
refactor(examples/react/star-wars): type the API responses and share the queries with 'queryOptions' (#12069) 2026-10-18 13:40:28 +09:00
Wonsuk Choi
256abf45f0
refactor(examples/react/rick-morty): type the API responses and share the queries with 'queryOptions' (#12068) 2026-10-18 13:40:06 +09:00
Wonsuk Choi
ffb1fbb62d
chore(examples/react): update '@types/react' and '@types/react-dom' to '^19' in the examples still on '^18' (#12067) 2026-10-18 13:39:47 +09:00
github-actions[bot]
12199722dc
ci: Version Packages (#12062)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-17 19:51:17 +02:00
Wonsuk Choi
5817e6f698
fix(examples/react): throw on non-ok 'fetch' responses in the query and mutation functions (#12058) 2026-10-17 18:06:09 +02:00
Wonsuk Choi
ec80fda0c1
docs(framework/react/overview): throw on a non-ok 'fetch' response in the example, and in 'examples/react/simple' (#12057) 2026-10-17 18:03:41 +02:00
Wonsuk Choi
a636462b85
refactor(examples/react/suspense): prefetch the projects in the click handler instead of inside the 'setShowProjects' updater (#12056) 2026-10-17 11:43:26 +09:00
Wonsuk Choi
9fbf293807
fix(examples/react/nextjs-app-optimistic-updates): return the invalidation promise from 'onSettled' so the pending todo stays until the refetch finishes (#12055) 2026-10-17 11:36:37 +09:00
Wonsuk Choi
584fd64144
refactor(examples/react/react-router): replace the deprecated 'ensureQueryData' with 'query' and 'staleTime: 'static'' in the loaders (#12052) 2026-10-17 11:01:52 +09:00
Wonsuk Choi
83b0831c27
fix(examples): rename the auto-refetching title from 'stale-time' to 'refetchInterval', which is the option it sets (#12051) 2026-10-17 04:01:34 +09:00
Wonsuk Choi
b71ff31696
fix(examples/react/offline): throw on non-ok responses so failures surface the server's message instead of a JSON parse error (#12050) 2026-10-17 03:54:46 +09:00
Wonsuk Choi
6f1fa2b843
fix(examples/react/chat): submit through a 'form' so 'Enter' cannot send an empty question (#12049) 2026-10-17 03:04:42 +09:00
Wonsuk Choi
9583088120
fix(examples/react/batching): show the character's 'status' instead of the query 'status' (#12045) 2026-10-17 03:01:30 +09:00
Wonsuk Choi
116818a610
fix(examples/react/rick-morty): read the episode's 'air_date' instead of the nonexistent 'airDate' (#12046) 2026-10-17 03:01:20 +09:00
Wonsuk Choi
817f823b9e
fix(examples/react/chat): give each question an 'id' so repeated questions get their own React key and query (#12047) 2026-10-17 03:01:08 +09:00
Wonsuk Choi
8ca99d1e57
fix(examples/react/chat): use camelCase 'strokeWidth', 'strokeLinecap' and 'strokeLinejoin' on the send icon (#12048) 2026-10-17 03:01:00 +09:00
Wonsuk Choi
eb94a5b445
chore(examples/react/react-native): add a flat config and run 'test:eslint' (#12039)
* chore(examples/react/react-native): add a flat config and run 'test:eslint'

* refactor(examples/react/react-native): fix lint errors
2026-10-17 01:08:08 +09:00
Wonsuk Choi
e75ecbedf2
refactor(examples/react/react-native): pass the movie title in route params and show the cached list item as 'placeholderData' (#12037)
* refactor(examples/react/react-native): pass the movie title in route params and show the cached list item as 'placeholderData'

* refactor(examples/react/react-native): check 'isError' instead of 'error' before rendering the data
2026-10-17 00:57:02 +09:00
github-actions[bot]
ee47993724
ci: Version Packages (#11998)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-15 09:50:17 +02:00
Wonsuk Choi
eea734d168
chore(examples/react): add the missing 'react' prefix to package names (#12028) 2026-10-15 13:42:43 +09:00
Wonsuk Choi
98451e1b3c
chore(examples/react): add 'test:types' to type-check the examples in CI (#12020)
* chore(examples/react): add 'test:types' to type-check the examples in CI

* chore(examples/react): run 'next typegen' before 'tsc' in the remaining Next.js examples
2026-10-15 10:01:28 +09:00
Wonsuk Choi
5959fdb80f
fix(examples/react/eslint-plugin-demo): pass the dependencies as arguments so the 'allowlist' demo is checked by 'exhaustive-deps' (#12012) 2026-10-14 11:42:31 +09:00
Wonsuk Choi
e3e6b466a9
refactor(examples/react/batching): rename the parsed 'ids' in 'onChange' to 'parsedIds' to avoid shadowing the state (#12013) 2026-10-14 11:23:20 +09:00
Wonsuk Choi
d5b265a547
chore(examples/react/playground): replace the legacy '.eslintrc' with a flat config and run 'test:eslint' (#12011)
* chore(examples/react/playground): replace the legacy '.eslintrc' with a flat config and run 'test:eslint'

* refactor(examples/react/playground): fix lint errors
2026-10-14 11:07:53 +09:00
Wonsuk Choi
6a4bfe5192
fix(examples/react/playground): keep only the edited fields as local state and apply the initial query defaults on creation (#11985)
* fix(examples/react/playground): keep only the edited fields as local state and apply the initial query defaults on creation

* fix(examples/react/playground): use 'defaultValue' for the numeric controls so they can be cleared while editing
2026-10-14 10:27:00 +09:00
Wonsuk Choi
ddcde7d5ad
chore(examples): use 'defineConfig' from 'eslint/config' and enable '@ts-check' in 'eslint.config.js' (#12008) 2026-10-14 10:01:19 +09:00
Wonsuk Choi
1836f7924c
chore(examples/react): replace the legacy '.eslintrc' with a flat config and run 'test:eslint' (#11995)
* chore(examples/react): replace the legacy '.eslintrc' with a flat config and run 'test:eslint'

* refactor(examples/react): fix lint warnings
2026-10-13 09:54:26 +09:00
Wonsuk Choi
70c652b8e4
chore(examples/react/eslint-legacy): add 'plugin:@typescript-eslint/recommended' and declare the packages used by '.eslintrc' (#11994) 2026-10-13 00:50:38 +09:00
Wonsuk Choi
fd814043dd
refactor(examples/react/suspense): share the project queries between prefetching and 'useSuspenseQuery' with 'queryOptions' (#11990) 2026-10-13 00:49:51 +09:00