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

[Autocomplete] Console error in Next.js App Router project: A props object containing a "key" prop is being spread into JSX #41035

Closed
neelbrahmakshatriya opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! nextjs

Comments

@neelbrahmakshatriya
Copy link

neelbrahmakshatriya commented Feb 9, 2024

Steps to reproduce

Link to live example: https://codesandbox.io/p/devbox/headless-smoke-58yr86

Current behavior

I am getting A props object containing a "key" prop is being spread into JSX console error whenever I use the following examples in my Next.js App Router project:

I have just copied the code from the above examples and the console error comes either on page reload, autocomplete is opened or an item is selected.

This error doesn't come in CRA, Vite or Next.js Pages Router projects (I have checked in these projects). This issue is specifically happening in the Next.js App router only.

Expected behavior

A props object containing a "key" prop is being spread into JSX console error should not come

Context

No response

Your environment

npx @mui/envinfo
  System:
    OS: macOS 14.1.1
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    npm: 10.4.0 - ~/.nvm/versions/node/v20.11.0/bin/npm
    pnpm: 8.15.1 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 121.0.6167.160
    Edge: 121.0.2277.112
    Safari: 17.1
  npmPackages:
    @emotion/react: latest => 11.11.3 
    @emotion/styled: latest => 11.11.0 
    @mui/base: 5.0.0-beta.36 => 5.0.0-beta.36 
    @mui/icons-material: latest => 5.15.9 
    @mui/material: latest => 5.15.9 
    @mui/material-nextjs: latest => 5.15.9 
    @types/react: latest => 18.2.55 
    react: latest => 18.2.0 
    react-dom: latest => 18.2.0 
    typescript: latest => 5.3.3

Search keywords: autocomplete, nextjs, app router, key prop being spread into JSX

@neelbrahmakshatriya neelbrahmakshatriya added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 9, 2024
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Feb 9, 2024
@samuelsycamore samuelsycamore added nextjs and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 9, 2024
@samuelsycamore
Copy link
Member

duplicate of #39795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! nextjs
Projects
None yet
Development

No branches or pull requests

4 participants