-
-
Notifications
You must be signed in to change notification settings - Fork 317
Expand file tree
/
Copy pathquery.tsx
More file actions
136 lines (134 loc) · 4.46 KB
/
query.tsx
File metadata and controls
136 lines (134 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import { WandSparkles, Zap } from 'lucide-react'
import { twMerge } from 'tailwind-merge'
import { CogsIcon } from '~/components/icons/CogsIcon'
import { query } from './libraries'
const textStyles = 'text-red-500 dark:text-red-400'
export const queryProject = {
...query,
description:
'Powerful asynchronous state management, server-state utilities and data fetching. Fetch, cache, update, and wrangle all forms of async data in your TS/JS, React, Vue, Solid, Svelte, Angular & Preact applications all without touching any "global state"',
ogImage: 'https://github.com/tanstack/query/raw/main/media/repo-header.png',
latestBranch: 'main',
bgRadial: 'from-red-500 via-red-500/60 to-transparent',
textColor: 'text-amber-500',
defaultDocs: 'framework/react/overview',
installPath: 'framework/$framework/installation',
legacyPackages: ['react-query'],
testimonials: [
{
quote:
"Honestly, if React Query had been around before Redux, I don't think Redux would have been nearly as popular as it was.",
author: 'Kent C. Dodds',
role: '@kentcdodds',
company: 'Epic Web',
},
{
quote:
'If I could go back in time and mass myself... I would hand myself a flash drive with a copy of react-query on it.',
author: 'Kent C. Dodds',
role: '@kentcdodds',
company: 'Epic Web',
},
{
quote: "React Query won. There's no denying that.",
author: 'Theo Browne',
role: '@t3dotgg',
company: 'Ping Labs',
},
{
quote:
'TanStack Query has been a game-changer for us. We love using it for react-admin.',
author: 'react-admin',
role: '@ReactAdmin',
company: 'Marmelab',
},
{
quote:
'The more I use React + Vite + TanStack Router + TypeScript + TanStack Query, the more I love it.',
author: 'Catalin Pit',
role: '@catalinmpit',
company: 'Developer Advocate',
},
{
quote:
'Combined with React Query, this stack has been a game-changer for my productivity.',
author: 'Dominik (TkDodo)',
role: '@TkDodo',
company: 'TanStack',
},
],
featureHighlights: [
{
title: 'Declarative & Automatic',
icon: (
<WandSparkles
className={twMerge('motion-safe:animate-pulse', textStyles)}
style={{
animationDuration: '5s',
animationTimingFunction: 'ease-in-out',
}}
/>
),
description: (
<div>
Writing your data fetching logic by hand is over. Tell TanStack Query
where to get your data and how fresh you need it to be and the rest is
automatic. It handles{' '}
<span className={twMerge('font-semibold', textStyles)}>
caching, background updates and stale data out of the box with
zero-configuration
</span>
.
</div>
),
},
{
title: 'Simple & Familiar',
icon: (
<Zap
className={twMerge('motion-safe:animate-bounce', textStyles)}
style={{
animationDuration: '2s',
animationTimingFunction: 'ease-in-out',
}}
/>
),
description: (
<div>
If you know how to work with promises or async/await, then you already
know how to use TanStack Query. There's{' '}
<span className={twMerge('font-semibold', textStyles)}>
no global state to manage, reducers, normalization systems or heavy
configurations to understand
</span>
. Simply pass a function that resolves your data (or throws an error)
and the rest is history.
</div>
),
},
{
title: 'Extensible',
icon: (
<CogsIcon
className={twMerge('motion-safe:animate-spin', textStyles)}
style={{
animationDuration: '10s',
animationTimingFunction: 'ease-in-out',
}}
/>
),
description: (
<div>
TanStack Query is configurable down to each observer instance of a
query with knobs and options to fit every use-case. It comes wired up
with{' '}
<span className={twMerge('font-semibold', textStyles)}>
dedicated devtools, infinite-loading APIs, and first class mutation
tools that make updating your data a breeze
</span>
. Don't worry though, everything is pre-configured for success!
</div>
),
},
],
}