Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a ResourceItem with a url param in conjunction with a custom AppProvider linkComponent logs a Function components cannot be given refs warning #12465

Open
freemer opened this issue Jul 25, 2024 · 2 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@freemer
Copy link

freemer commented Jul 25, 2024

Summary

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.

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

@freemer freemer added Bug Something is broken and not working as intended in the system. untriaged labels Jul 25, 2024
Copy link
Contributor

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.

@stewx
Copy link
Contributor

stewx commented Jan 24, 2025

Also running into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

2 participants