Skip to content

Commit

Permalink
fix(docs): update forEach to use map (#37008)
Browse files Browse the repository at this point in the history
  • Loading branch information
DSchau committed Nov 14, 2022
1 parent 3a4d333 commit 58197a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/how-to/performance/using-slices.md
Expand Up @@ -123,7 +123,7 @@ In this example, let's say you want to pull all header items from your CMS.
const Header = ({ data }) => {
return (
<div>
{data.allHeaderItems.nodes.forEach(headerItem = (
{data.allHeaderItems.nodes.map(headerItem = (
// highlight-next-line
<Link to={headerItem.path}>{headerItem.text}</Link>
))}
Expand Down

0 comments on commit 58197a0

Please sign in to comment.