Skip to content

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

@neelbrahmakshatriya

Description

@neelbrahmakshatriya

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

Metadata

Metadata

Assignees

Labels

nextjsscope: autocompleteChanges related to the autocomplete. This includes ComboBox.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions