Skip to content

Commit 7a4dcbd

Browse files
committed
Improve ReferenceFieldBase doc.
1 parent 7da0b63 commit 7a4dcbd

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
@@ -279,19 +279,14 @@ const PostList = () => (
279279
render={({ data, isPending }) => (
280280
<>
281281
{!isPending &&
282-
data.map(author => (
283-
<RecordContextProvider
284-
value={author}
285-
key={author.id}
286-
>
287-
<div>
288-
<h3>{author.title}</h3>
289-
<ReferenceFieldBase source="author_id" reference="authors">
290-
<AuthorView />
291-
</ReferenceFieldBase>
292-
</div>
293-
</RecordContextProvider>
294-
))
282+
<RecordsIterator render={(author) => (
283+
<div>
284+
<h3>{author.title}</h3>
285+
<ReferenceFieldBase source="author_id" reference="authors">
286+
<AuthorView />
287+
</ReferenceFieldBase>
288+
</div>
289+
)} />
295290
}
296291
</>
297292
)}

0 commit comments

Comments
 (0)