Update lists-and-keys.md (#559)

I think the word "root" is misleading here. For me the root implies a single item, and the <li> here is more of a leaf. I think we can avoid all confusion simply by removing the word.
This commit is contained in:
Hugh Prior
2018-02-01 18:08:16 +01:00
committed by Alex
parent 180ee6b6d7
commit 788d5094d8

View File

@@ -138,7 +138,7 @@ Here is an [in-depth explanation about why keys are necessary](/docs/reconciliat
Keys only make sense in the context of the surrounding array.
For example, if you [extract](/docs/components-and-props.html#extracting-components) a `ListItem` component, you should keep the key on the `<ListItem />` elements in the array rather than on the root `<li>` element in the `ListItem` itself.
For example, if you [extract](/docs/components-and-props.html#extracting-components) a `ListItem` component, you should keep the key on the `<ListItem />` elements in the array rather than on the `<li>` element in the `ListItem` itself.
**Example: Incorrect Key Usage**