Skip to content

Commit

Permalink
Wrap JSX element array in fragment tag (#6043)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philzen authored Jul 26, 2022
1 parent 5e8f7f9 commit 981d063
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/docs/tutorial/chapter6/multiple-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,15 @@ export const Failure = ({ error }: CellFailureProps) => (
)

export const Success = ({ comments }: CellSuccessProps) => {
return (
// highlight-start
return comments.map((comment) => (
<Comment key={comment.id} comment={comment} />
))
<>
{comments.map((comment) => (
<Comment key={comment.id} comment={comment} />
))}
</>
// highlight-end
)
}
```

Expand Down

0 comments on commit 981d063

Please sign in to comment.