ITADN

Bug Report: Missing key Prop in List Items in `ExpandButton` tree

#229Closedpbower 创建于 2025-03-06
P
pbowercommented
## Bug Report: Missing `key` Prop in List Items ### Description I'm encountering a React warning that appears to originate from this library. The error message suggests that a unique `key` prop is missing in a list item, likely within a `.map()` expression inside a `<div>`. ### Error message > Each child in a list should have a unique 'key' prop. > > Check the render method of `div`. See https://react.dev/link/warning-keys for more information. It suggests that there is a `key` field that needs an ID in a list somewhere, most likely in a `.map()` expression. This warning is affecting runtime behaviour and would be great to resolve to prevent unnecessary console errors. ### React DevTools Stack Trace ```proto ExpandButton2 props new entry : "" context value : { mosaicWindowActions: {……} mosaicWindowActions : {connectDragSource: () => {}, getPath: () => {}, re…} connectDragSource : () => {} getPath : () => {} replaceWithNew : () => {} setAdditionalControlsOpen : () => {} split : () => {} new entry : "" new entry : "" errors Each child in a list should have a unique "key" prop. Check the render method of `div`. See https://react.dev/link/warning-keys for more information. rendered by createRoot() react-dom@19.0.0 source react-mosaic-component.js?v=3bd8f829:8303 ```
关闭于 2025-03-06 1 条评论