We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b20bec commit 5c5f55aCopy full SHA for 5c5f55a
docs/ReferenceFieldBase.md
@@ -261,19 +261,14 @@ const PostList = () => (
261
render={({ data, isPending }) => (
262
<>
263
{!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
- ))
+ <RecordsIterator render={(author) => (
+ <div>
+ <h3>{author.title}</h3>
+ <ReferenceFieldBase source="author_id" reference="authors">
+ <AuthorView />
+ </ReferenceFieldBase>
+ </div>
+ )} />
277
}
278
</>
279
)}
0 commit comments