Skip to content

Commit

Permalink
Merge pull request #244 from slorber/patch-1
Browse files Browse the repository at this point in the history
React 19 docs - do not advise to add a key in `getLineProps` + `getTokenProps`
  • Loading branch information
carbonrobot authored Apr 26, 2024
2 parents f52167e + 8b49a1b commit e35950e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ advisable.
#### `getLineProps`

You need to add a `line` property (type: `Token[]`) to the object you're passing to
`getLineProps`; It's also advisable to add a `key`.
`getLineProps`.

This getter will return you props to spread onto your line elements (typically `<div>s`).

Expand All @@ -277,7 +277,7 @@ The `className` will always contain `.token-line`.
#### `getTokenProps`

You need to add a `token` property (type: `Token`) to the object you're passing to
`getTokenProps`; It's also advisable to add a `key`.
`getTokenProps`.

This getter will return you props to spread onto your token elements (typically `<span>s`).

Expand Down

0 comments on commit e35950e

Please sign in to comment.