- Issue created by @soaratul
- 🇺🇸United States bnjmnm Ann Arbor, MI
Not reproducible on my end, please provide additional steps.
- 🇮🇳India omkar-pd
I was able to reproduce with the given steps.
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? Check the render method of `SlotClone`. at Panel (http://localhost:5173/src/components/Panel.tsx:22:11) at
- 🇺🇸United States bnjmnm Ann Arbor, MI
Anything additional come to mind? This is on 0.x with a cleared cache.
- 🇮🇳India soaratul
@bnjmnm I debugged and found that the problem is with Panel(ui/src/components/Panel.tsx) > Topbar(ui/src/components/topbar/Topbar.tsx) component.
To solve this, there are two approaches I found
- Remove asChild prop from Topbar > Menubar.Root component
- Wrap the Panel component with forwardRef
The 1st approach is easy and quick, but it will not produce the same html structure as it was supposed to be, 2nd approach works with no error and with asChild prop as well.
Note: Both approaches pass all test cases
- Merge request !363#3479895: Client-side warning due to insufficient use of @radix-ui/react-slot → (Merged) created by soaratul
-
balintbrews →
committed 2f84d78e on 0.x authored by
soaratul →
Issue #3479895 by soaratul: Client-side warning due to insufficient use...
-
balintbrews →
committed 2f84d78e on 0.x authored by
soaratul →
- 🇳🇱Netherlands balintbrews Amsterdam, NL
Nice fix, @soaratul! 🎉 I forgot to do this when I introduced the
Panel
component in ✨ Implement new design for top bar and sidebars Active : https://www.radix-ui.com/primitives/docs/guides/composition#your-compone.... Automatically closed - issue fixed for 2 weeks with no activity.