Skip to content

Commit 5c5f55a

Browse files
committed
Improve ReferenceFieldBase doc.
1 parent 4b20bec commit 5c5f55a

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

docs/ReferenceFieldBase.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -261,19 +261,14 @@ const PostList = () => (
261261
render={({ data, isPending }) => (
262262
<>
263263
{!isPending &&
264-
data.map(author => (
265-
<RecordContextProvider
266-
value={author}
267-
key={author.id}
268-
>
269-
<div>
270-
<h3>{author.title}</h3>
271-
<ReferenceFieldBase source="author_id" reference="authors">
272-
<AuthorView />
273-
</ReferenceFieldBase>
274-
</div>
275-
</RecordContextProvider>
276-
))
264+
<RecordsIterator render={(author) => (
265+
<div>
266+
<h3>{author.title}</h3>
267+
<ReferenceFieldBase source="author_id" reference="authors">
268+
<AuthorView />
269+
</ReferenceFieldBase>
270+
</div>
271+
)} />
277272
}
278273
</>
279274
)}

0 commit comments

Comments
 (0)