Skip to content

Commit

Permalink
Correct highlighted lines and wrap <comment>s in React fragment in …
Browse files Browse the repository at this point in the history
…tutorial chapter 6 (#5058)

* Remove unnecessary highlight (line is generated by default)

* Keep React fragment as wrapping container

Avoid invalid JSX element array, similar to #5020

* Fix highlighting b/c that lines actually changed as well

* Add back highlight

Going to add this back for now since it's used in the example

Co-authored-by: Dominic Saadi <32992335+jtoar@users.noreply.github.com>
  • Loading branch information
Philzen and jtoar committed May 4, 2022
1 parent 17b60fd commit 174673f
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 @@ -67,11 +67,15 @@ export const Failure = ({ error }) => (
)

export const Success = ({ comments }) => {
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 174673f

Please sign in to comment.