Steps
<Item header="1984" meta="1984" />
// or even:
<Item>
<Item.Content header="1984" meta={1984} />
</Item>
Expected Result
No issues.
Actual Result
Warning: Encountered two children with the same key, `1984`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
The warning is caused by the keys being automatically set from the value, here:
|
} else if (valIsString || valIsNumber) { |
|
// use string/number shorthand values as the key |
|
props.key = val |
|
} |
Note that there's no need for keys at all in this example.
One workaround that prevents the keys from being set (and therefore the error):
<Item header={{ content: "1984" }} meta={{ content: "1984" }} />
// yuck
Version
0.77.1
Testcase
https://codesandbox.io/s/4r702vq8y4
Steps
Expected Result
No issues.
Actual Result
The warning is caused by the keys being automatically set from the value, here:
Semantic-UI-React/src/lib/factories.js
Lines 89 to 92 in 9ef4156
Note that there's no need for keys at all in this example.
One workaround that prevents the keys from being set (and therefore the error):
Version
0.77.1
Testcase
https://codesandbox.io/s/4r702vq8y4