Skip to content

Commit 5fd2476

Browse files
committed
use new props in the doc
1 parent 691a075 commit 5fd2476

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

docs/ReferenceManyFieldBase.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,15 @@ export const AuthorShow = () => (
134134
<ShowBase>
135135
<ReferenceManyFieldBase label="Books" reference="books" target="author_id">
136136
<WithListContext
137-
render={({ isPending, data }) => (
137+
loading={<p>Loading...</p>}
138+
render={({ data }) => (
138139
<ul>
139-
{!isPending &&
140-
data.map(book => (
141-
<li key={book.id}>
142-
<i>{book.title}</i>, published on {book.published_at}
143-
</li>
144-
))}
140+
{data.map(book => (
141+
<li key={book.id}>
142+
<i>{book.title}</i>, published on
143+
{book.published_at}
144+
</li>
145+
))}
145146
</ul>
146147
)}
147148
/>
@@ -345,12 +346,12 @@ In the example below, both lists use the same reference ('books'), but their sel
345346
}}
346347
>
347348
<WithListContext
348-
render={({ isPending, data }) => (
349+
loading={<p>Loading...</p>}
350+
render={({ data }) => (
349351
<>
350-
{!isPending &&
351-
data.map(book => (
352-
<p key={book.id}>{book.title}</p>
353-
))}
352+
{data.map(book => (
353+
<p key={book.id}>{book.title}</p>
354+
))}
354355
</>
355356
)}
356357
/>

0 commit comments

Comments
 (0)