We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb951b commit 37e1a57Copy full SHA for 37e1a57
src/pages/2023-11/react-server-components/index.mdx
@@ -20,7 +20,7 @@ The big thing that makes server component different than client components is th
20
function ClientComponent() {
21
const [data, setData] = useState(null)
22
const [loading, setLoading] = useState(true)
23
- const [errr, setError] = useState(false)
+ const [error, setError] = useState(false)
24
25
useEffect(() => {
26
setLoading(true)
@@ -48,11 +48,10 @@ function ClientComponent() {
48
async function ServerComponent() {
49
try {
50
const data = await fetch("/api/data").then(res => res.json())
51
+ return <p>{data}</p>
52
} catch (error) {
53
return <p>Error</p>
54
}
-
55
- return <p>{data}</p>
56
57
```
58
0 commit comments