Skip to content

[React]: isSidenavExpanded prop passed to Link component throws React warning #4348

Closed
@metonym

Description

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

For the SideNavLink component in UIShell, a React warning is emitted to the console as an error when the SideNav prop expanded is true. The isSideNavExpanded prop in SideNavLink is passed to the Link component. Because it is not a valid DOM attribute, React throws a warning.

This isn't a functional bug; rather, the aim is to remove the React warning.

Omitting passing the isSideNavExpanded prop to the Link component would eliminate the error.

Steps to reproduce the issue

  1. Visit Reduced Test case in CodeSandbox
  2. Open the console
  3. React warning is printed in the console as an error

Additional information

React warning

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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