Skip to content

Commit

Permalink
Fix Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
WebDevSimplified committed Jan 12, 2024
1 parent deb951b commit 37e1a57
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/2023-11/react-server-components/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The big thing that makes server component different than client components is th
function ClientComponent() {
const [data, setData] = useState(null)
const [loading, setLoading] = useState(true)
const [errr, setError] = useState(false)
const [error, setError] = useState(false)

useEffect(() => {
setLoading(true)
Expand Down Expand Up @@ -48,11 +48,10 @@ function ClientComponent() {
async function ServerComponent() {
try {
const data = await fetch("/api/data").then(res => res.json())
return <p>{data}</p>
} catch (error) {
return <p>Error</p>
}

return <p>{data}</p>
}
```

Expand Down

0 comments on commit 37e1a57

Please sign in to comment.