Skip to content

Commit 7e0eea9

Browse files
sliktstrojanowski
authored andcommitted
docs: fix invalid syntax in Suspense example in README.md (#50)
1 parent 5ed243d commit 7e0eea9

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,11 @@ To check if data is loaded use the
112112
```javascript
113113
import React, { Suspense } from 'react';
114114

115-
const MyComponent = () => {
116-
return (
117-
return (
118-
<Suspense fallback={<div>Loading...</div>}>
119-
<Dogs />
120-
</Suspense>
121-
)
122-
);
123-
}
115+
const MyComponent = () => (
116+
<Suspense fallback={<div>Loading...</div>}>
117+
<Dogs />
118+
</Suspense>
119+
);
124120
```
125121

126122
Alternatively you can use the `useQuery` hook without suspense with the

0 commit comments

Comments
 (0)