You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a ResourceItem with a url param in conjunction with a custom AppProviderlinkComponent logs a Function components cannot be given refs warning
#12465
Open
freemer opened this issue
Jul 25, 2024
· 2 comments
The UnstyledLink component passes along its ref to the custom linkComponent. Wrapping the custom linkComponent in a ForwardRef solves the error, but isn't allowed by the AppProvider's typescript types
Expected behavior
This combination of components should render without warnings.
Summary
The
UnstyledLink
component passes along itsref
to the customlinkComponent
. Wrapping the customlinkComponent
in aForwardRef
solves the error, but isn't allowed by theAppProvider
's typescript typesExpected behavior
This combination of components should render without warnings.
Actual behavior
A warning is output on render.
Steps to reproduce
https://codesandbox.io/s/great-haze-stn675?file=/App.tsx
Are you using React components?
Yes
Polaris version number
latest
Browser
Chrome
Device
Macos
The text was updated successfully, but these errors were encountered: