You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a <Stack /> component is rendered with wrap set to true, the child <div class="ms-Stack-inner..."> does not have a key prop.
The new version of React logs the following error in the console:
hydration-error-info.ts:72 Each child in a list should have a unique "key" prop.
Check the render method of Stack. See https://react.dev/link/warning-keys for more information. Error Component Stack
Workaround
If I add the key manually to the inner slot, React is satisfied
Package
react
Package version
8.122.0
React version
19.0.0
Environment
Current Behavior
When a
<Stack />
component is rendered withwrap
set totrue
, the child<div class="ms-Stack-inner...">
does not have a key prop.The new version of React logs the following error in the console:
Workaround
If I add the key manually to the inner slot, React is satisfied
<Stack horizontal styles={styles.footerMenu} wrap inner={{ key: 'footerColumns' }} >
Expected Behavior
I expect that no manual workaround should be needed.
Reproduction
https://stackblitz.com/edit/vitejs-vite-zep2kv6g?file=src%2FApp.tsx
Steps to reproduce
Are you reporting an Accessibility issue?
None
Suggested severity
Medium - Has workaround
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: