React duplicate key warning in QueryHistory component since 0.16.0
See original GitHub issueSince upgrading to 0.16.0
I’m getting duplicate key warnings from the QueryHistory
component. I have a few of the same items in the history - this looks to be the issue here: https://github.com/graphql/graphiql/blob/87e9d465b51487d41f03e7c09eda5d2e7116e1cb/packages/graphiql/src/components/QueryHistory.js#L96
0.chunk.js:319590 Warning: Encountered two children with the same key, `mutation SomeMutation($input: SomeMutationInput!) {
someMutation(input: $input) {
result
}
}`. 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.
in ul (created by QueryHistory)
in section (created by QueryHistory)
in QueryHistory (created by GraphiQL)
in div (created by GraphiQL)
in div (created by GraphiQL)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (4 by maintainers)
Top Results From Across the Web
REACT Duplicated Key Warning - Stack Overflow
Recommended solution. The problem is that your doc.id is repeating. You are setting the imageData at the imageQuery.
Read more >Encountered Two Children with the Same Key — React Fix
Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or ...
Read more >How to Fix 'Each child should have a unique key prop' - Webtips
Learn what is the root cause, and how to fix 'Warning: Each child in a list should have a unique 'key' prop.' warnings...
Read more >Use the key prop when Rendering a List with React | egghead.io
[1:05] That's the case where you need to have a key prop for every React element in the array. We're seeing this warning...
Read more >Bug #28216: React duplicate key error on Subscriptions page
Warning : Encountered two children with the same key, `0-row`. Keys should be unique so that components maintain their identity across updates. Non-unique...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
About to take care of this in the upgrade to react 16 this week. Thanks for reporting it!
On Mon, Oct 28, 2019 at 8:38 AM Mickael Neves notifications@github.com wrote:
@moroshko we have a few more PRs waiting for the next release, one in particular that fixes our minified build. our latest published one is provisional from that PR. our minified builds are the most widely used. so hopefully later this week!