🐛 Bug Report: Console errors from MUI4 components used in core-components SidebarItem #24737
Open
2 tasks done
Labels
bug
Something isn't working
Milestone
📜 Description
Using the SidebarItem and Link components from backstage's core-components produces console errors in Portal.
👍 Expected behavior
No console errors for deprecated apis used in backstage's core-components.
👎 Actual Behavior with Screenshots
The SidebarItem component in backstage's core-components results in the following console error in Portal -
👟 Reproduction steps
Create a react app and add @backstage/core-components as a dependency. Create a new sidebar item with an
onClick
handler it uses an mui4 button under the hood like so:Or use the core-component Link component with an
onClick
handler. Will produce the same console error.📃 Provide the context for the Bug.
Looks to be a result of the muiv4 Button component use in the SidebarItem here:
backstage/packages/core-components/src/layout/Sidebar/Items.tsx
Lines 466 to 474 in 3c47d9b
For the Link component it seems muiv4 Link might be using a deprecated api.
@awanlin has additionally highlighted that this might be the result of logging added in react 18.3 around deprecated apis - https://react.dev/blog/2024/04/25/react-19-upgrade-guide#react-18-3
🖥️ Your Environment
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: