Skip to content

[bug]: Missing key prop for element in iterator in sidebar-16.tsx #8204

@Nel4Nelson

Description

@Nel4Nelson

Describe the bug

The NavigationMenuLink component inside a mapped array is missing a required key prop, causing React/ESLint errors. The key prop is currently placed on the NavigationMenuLink component but should be on the parent

  • element that's being iterated over.

    Current code:

      <li>
        <NavigationMenuLink key={component.title} asChild>
    
    
    
    Expected fix:
    ```{components.map((component) => (
      <li key={component.title}>
        <NavigationMenuLink asChild>
    
    ### Affected component/components
    
    /apps/www/registry/new-york/v0/sidebar-16.tsx
    
    ### How to reproduce
    
    Navigate to /apps/www/registry/new-york/v0/sidebar-16.tsx
    Look at line 362 in the components mapping
    Run ESLint or check console for react/jsx-key errors
    The error appears: "Missing 'key' prop for element in iterator"
    
    ### Codesandbox/StackBlitz link
    
    _No response_
    
    ### Logs
    
    ```bash
    Missing "key" prop for element in iterator
    

    System Info

    Ubuntu 25.xx, Brave browser

    Before submitting

    • I've made research efforts and searched the documentation
    • I've searched for existing issues
  • Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      bugSomething isn't working

      Type

      No type

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions