forked from TanStack/query
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.js
57 lines (54 loc) · 1.82 KB
/
Home.js
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
import React from "react";
import { Typography } from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import { Link } from "@material-ui/core";
import { Link as RouterLink } from "react-router-dom";
export default function Home() {
const classes = useStyles();
return (
<div>
<Typography variant="h2">React Query Demo</Typography>
<Typography variant="subtitle1">Using the Rick And Morty API</Typography>
<Typography variant="subtitle2">
(Built by <a href="https://twitter.com/axelfuh">@axelfuh</a>
)
</Typography>
<section className={classes.main}>
<Typography variant="h5">Why React Query?</Typography>
<Typography variant="body1">
In this demo you will be able to see how React Query is a significant
improvement over <strong>redux</strong>, <strong>mobx</strong>, and
any other general-purpose state container.
</Typography>
<Typography variant="body1">
No reducers, thunks, or sagas. No ES6 models to maintain in order to
tag them as observable.
</Typography>
<Typography variant="body1">
Simply associate a key with your fetch call and let{" "}
<strong>React Query</strong> handle the rest.
</Typography>
<Typography variant="h5">Ready to get started?</Typography>
<Typography variant="body1">
Check out the{" "}
<Link component={RouterLink} to="/episodes">
Episodes
</Link>{" "}
and{" "}
<Link component={RouterLink} to="/characters">
Characters
</Link>
!
</Typography>
</section>
</div>
);
}
const useStyles = makeStyles(() => ({
main: {
margin: "44px 0",
"& p": {
margin: "12px 0 24px"
}
}
}));