Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Stack Inner does not have a react key assigned to it #33461

Open
2 tasks done
jsomdev opened this issue Dec 12, 2024 · 0 comments
Open
2 tasks done

[Bug]: Stack Inner does not have a react key assigned to it #33461

jsomdev opened this issue Dec 12, 2024 · 0 comments
Labels
Fluent UI react (v8) Issues about @fluentui/react (v8) Type: Bug 🐛

Comments

@jsomdev
Copy link

jsomdev commented Dec 12, 2024

Package

react

Package version

8.122.0

React version

19.0.0

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1365U
    Memory: 15.74 GB / 31.66 GB
  Browsers:
    Edge: Chromium (127.0.2651.86)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @fluentui/react: ^8.122.0 => 8.122.0
    @types/react: 19.0.1 => 19.0.1
    @types/react-dom: 19.0.2 => 19.0.2
    react: 19.0.0 => 19.0.0
    react-dom: 19.0.0 => 19.0.0

Current Behavior

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

<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

  1. Make sure you npm install --force
  2. Npm run dev
  3. Open the console and look at App.tsx

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

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fluent UI react (v8) Issues about @fluentui/react (v8) Type: Bug 🐛
Projects
None yet
Development

No branches or pull requests

2 participants