Error: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? #1957
Unanswered
vitormarkis
asked this question in
Help
Replies: 1 comment 2 replies
-
The Tag component is a dropdown? If so can you show? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm receiving this error:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
when i'm not even trying to use a ref.The app works fine, but i wanna handle this error.
Here is the repo: https://github.com/vitormarkis/asseties
The steps to invoke the error:
I click a
<Tag />
(purple element), then 'Editar'<PopoverButton />
, and the<EditTag />
opens.Inside Tag element >
Inside PopoverButton >
And the element i'm rendering is this EditTag component
This error occur once in the app lifetime, F5
I found this error is occurring in the line
{element ? <Dialog.Portal>{element}</Dialog.Portal> : null}
inside<PopoverButton />
componentBeta Was this translation helpful? Give feedback.
All reactions