-
Notifications
You must be signed in to change notification settings - Fork 100
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
Compose refs helper #57
Labels
Comments
Maybe |
@streamich |
I think const handleRef1 = (ref) => console.log(1, ref)
const handleRef2 = (ref) => console.log(2, ref)
<div {...composeEvents({ ref: handleRef1 }, { ref: handleRef2 })}>
Ref div
</div> If someone wants to contribute with this caveat solution say here that I reopen this issue. ✌️ |
Nice! Looks like it's working great here 🤘. Wonder if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was curious if you had any ideas about some type of utility to help with composing multiple ref functions that could possibly be added to this library? I'm thinking it would be similar to the
composeEvents
function we talked about in #32.I'm wondering if there is any way to memoize all the function calls so we can avoid this caveat when composing multiple refs? It would be really cool if this could be baked into
composeEvents
as well.This is my idea:
The text was updated successfully, but these errors were encountered: