-
Notifications
You must be signed in to change notification settings - Fork 148
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
ref doesn't work on <swipeable> #77
Comments
@DrBoria nice find and thank you for creating an issue. I'm surprised this is the first time someone has mentioned and asked for We have a few options:
Essentially there is no way currently to just do We just need to decide on what to name it, currently leaning towards Great reference to follow the real issue with ref's and HOC's - facebook/react#4213 |
Cool thanks) |
I was using the const handlers = useSwipeable({ ... });
const myRef = React.useRef();
<div {...handlers} ref={(t) => {
handlers.ref(t); // calling halders ref for touch devices
myRef.current = t; // setting our ref
}}> Note: The |
@xxxzeus nice! that's the same approach i tried to communicate here too. We'll try to make this a bit more obvious and document it well in |
Can't use ref on swipeable container. Ref links not to dom node, but on swipeable component.
The text was updated successfully, but these errors were encountered: