diff --git a/docs/core/api/useDLE.md b/docs/core/api/useDLE.md index d81913703112..6df157587790 100644 --- a/docs/core/api/useDLE.md +++ b/docs/core/api/useDLE.md @@ -50,7 +50,7 @@ import { ProfileResource } from './ProfileResource'; function ProfileList(): JSX.Element { const { data, loading, error } = useDLE(ProfileResource.getList); if (error) return
Error {`${error.status}`}
; - if (loading || !data) return <>loading...; + if (loading || !data) return ; return (
{data.map(profile => ( @@ -165,7 +165,7 @@ function ProfileDetail(): JSX.Element { error, } = useDLE(ProfileResource.get, { id: 1 }); if (error) return
Error {`${error.status}`}
; - if (loading || !profile) return <>loading...; + if (loading || !profile) return ; return (
@@ -230,7 +230,7 @@ import { PostResource, UserResource } from './Resources'; export default function PostWithAuthor({ id }: { id: string }) { const postDLE = useDLE(PostResource.get, { id }); if (postDLE.error) return
Error {`${postDLE.error.status}`}
; - if (postDLE.loading || !postDLE.data) return <>loading...; + if (postDLE.loading || !postDLE.data) return ; const authorDLE = useDLE( UserResource.get, postDLE.data.userId @@ -240,7 +240,7 @@ export default function PostWithAuthor({ id }: { id: string }) { : null, ); if (authorDLE.error) return
Error {`${authorDLE.error.status}`}
; - if (authorDLE.loading || !authorDLE.data) return <>loading...; + if (authorDLE.loading || !authorDLE.data) return ; return
{authorDLE.data.username}
} @@ -281,7 +281,7 @@ import { getPosts } from './api/Post'; export default function ArticleList({ page }: { page: string }) { const { data, loading, error } = useDLE(getPosts, { page }); if (error) return
Error {`${error.status}`}
; - if (loading || !data) return <>loading...; + if (loading || !data) return ; const { results: posts, nextPage, lastPage } = data; return (
diff --git a/docs/core/getting-started/data-dependency.md b/docs/core/getting-started/data-dependency.md index 57a002d57f42..c7cd5a097f2d 100644 --- a/docs/core/getting-started/data-dependency.md +++ b/docs/core/getting-started/data-dependency.md @@ -252,7 +252,7 @@ import { ProfileResource } from './ProfileResource'; function ProfileList(): JSX.Element { const { data, loading, error } = useDLE(ProfileResource.getList); if (error) return
Error {`${error.status}`}
; - if (loading || !data) return <>loading...; + if (loading || !data) return ; return (
{data.map(profile => ( diff --git a/docs/core/shared/_useLoading.mdx b/docs/core/shared/_useLoading.mdx index 2d151176b744..3ebf10fa656b 100644 --- a/docs/core/shared/_useLoading.mdx +++ b/docs/core/shared/_useLoading.mdx @@ -1,5 +1,8 @@ import HooksPlayground from '@site/src/components/HooksPlayground'; -import { postFixtures,getInitialInterceptorData } from '@site/src/fixtures/posts'; +import { + postFixtures, + getInitialInterceptorData, +} from '@site/src/fixtures/posts'; @@ -54,18 +57,18 @@ export default function PostForm({ onSubmit, loading, error }) { }; return (
- - + + {error ? (
{error.message}
) : null} @@ -93,8 +96,9 @@ export default function PostCreate({ navigateToPost }) { }, [ctrl], ); - return ; + return ( + + ); } ``` @@ -119,4 +123,4 @@ function Navigation() { render(); ``` - \ No newline at end of file + diff --git a/docs/rest/api/Collection.md b/docs/rest/api/Collection.md index a82625a35d60..f931f6653b52 100644 --- a/docs/rest/api/Collection.md +++ b/docs/rest/api/Collection.md @@ -121,7 +121,7 @@ export default function NewTodo({ userId }: { userId?: string }) { }; return ( -
+