Skip to content

useMenuItem access key prop causes Warning:MenuItem: key is not a prop #1234

Closed
@Tatametheus

Description

@Tatametheus

🐛 Bug Report

Item uses key from props, but causing warning under StrictMode.

🤔 Expected Behavior

😯 Current Behavior

Warning: MenuItem: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop.

💁 Possible Solution

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
react-spectrum
Browser
Operating System

🧢 Your Company/Team

🕷 Tracking Issue (optional)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions