react报错:Warning: Each child in a list should have a unique “key“ prop.

我是万万没想到的,使用Popconfirm不添加key属性也会报错:

@react-refresh:160Warning: Each child in a list should have a unique "key" prop. Check the render method of `Cell`. Seehttps://reactjs.org/link/warning-keys for more information. athttp://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:33866:34 at Cell3 (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:37961:25) athttp://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:38077:22 at tr at BodyRow (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:38316:25) at tbody at Provider3 (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:37860:22) at Body (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:38520:19) at table at div at div athttp://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:39317:23 at div at Table (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:39327:25) at div at div at Spin2 (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:32044:25) at SpinFC2 (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:32089:34) at div at InternalTable (http://localhost:5173/node_modules/.vite/deps/chunk-2Q4JEYIA.js?v=2824dff9:43767:34) at div at div at LicenseList (http://localhost:5173/src/pages/StoreRun/serve/list/index.tsx?t=1714118344716:36:22) at InnerLoadable2 (http://localhost:5173/node_modules/.vite/deps/@loadable_component.js?v=2824dff9:155:34) at LoadableWithChunkExtractor2 at Loadable

给Popconfirm添加key属性后就好了.......

害我找了好久才找到这种神奇的bug

相关推荐
Penge6666 小时前
《Go 后端开发者学 React:组件通信与插槽》
javascript
Penge6668 小时前
《Go 后端开发者学 React:useState》
javascript
Penge6668 小时前
《Go 后端开发者学 React:数据渲染》
javascript
ikoala11 小时前
AI 写页面像说明书,修 Bug 像贴膏药?把这两句话写进 AGENTS.md
前端·javascript·ai编程
Penge66611 小时前
《Go 后端开发者学 TypeScript:ES Module了解》
javascript
Penge66611 小时前
《Go 后端开发者学 TypeScript:从零搭建与运行》
javascript
Penge66612 小时前
《Go 后端开发者学 TypeScript:keyof关键字》
javascript
Penge66613 小时前
《Go 后端开发者学 TypeScript:extends关键字》
javascript
张张123y13 小时前
DSH 插件调试避坑:client.js 设置面板、热重载与高频报错排查表
开发语言·javascript·人工智能·开源·ecmascript·后端开发·ai agent
Penge66618 小时前
《Go 后端开发者学 TypeScript:typescript 类型断言》
javascript