-
Can I provide a DOM element to I suppose I pass a ref down from the root, and manually add/remove each event handler returned by bind? Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
dbismut
May 31, 2021
Replies: 1 comment 2 replies
-
Not sure what you mean: you can pass useDrag(handler, { target: yourRef }) Maybe if you describe your use case in more details it might be clearer. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
yuchant
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure what you mean: you can pass
{... bind()}
to a r3f<mesh {...bind()} />
, no problem.The lib supports passing a ref but it needs to be an HTMLElement:
Maybe if you describe your use case in more details it might be clearer.