Skip to content

Commit

Permalink
docs: fix the react example for infinite queries (#5361)
Browse files Browse the repository at this point in the history
The example talks about a projects API that returns data in the form of
```
{ data: [...], nextCursor: 3}
```

In the example though the data returned from the API is referred to
as having a `projects` entry.
This commit uses the correct entry from the sample API.

Co-authored-by: Manuel Ernst <manuel.ernst@inovex.de>
  • Loading branch information
seriousManual and Manuel Ernst committed May 2, 2023
1 parent f1ac845 commit 53813e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/react/guides/infinite-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Projects() {
<>
{data.pages.map((group, i) => (
<React.Fragment key={i}>
{group.projects.map((project) => (
{group.data.map((project) => (
<p key={project.id}>{project.name}</p>
))}
</React.Fragment>
Expand Down

0 comments on commit 53813e4

Please sign in to comment.