Replies: 2 comments 5 replies
-
Passing the ref is the recommended solution, there is nothing wrong with it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't think it's needed as a dependency in the useEffect, but I might be wrong |
Beta Was this translation helpful? Give feedback.
5 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Say that I have a custom hook in which I want to interact with riveropd providers amongst other things.
Can I just pass in the WidgetRef as a param to the hook then?
This satisfies all rules for hooks and seem to work just fine in my testing.
But I'm interested if this is actually considered an anti-pattern that should be avoided.
Beta Was this translation helpful? Give feedback.
All reactions