# Warning: Each record in table should have a unique key prop,or set rowKey to an unique primary k

antd使用Table报错，

This one was confusing to me as well, because I was confusing COLUMN keys with ROW keys. This error has nothing to do with "key" in your column config.

Ant is expecting you to have a unique key specifically named "key" on each row of data, like so:

{ key: 1, value: 'foo'}

{ id: 1, value: 'foo'}

In order to resolve this, I added a rowKey property to my Table like so:

<Table columns={this.columns} dataSource={this.state.results} rowKey='id' />

https://github.com/ant-design/ant-design/issues/7623

Warning: Encountered two children with the same key, XXX. Keys should be unique so that components maintain their identity across updates.

Warning: Each record in table should have a unique key prop,or set rowKey to an unique primary key.

03-16 1556