Skip to content
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

Hammer breaks ref in children #93

Open
ibc opened this issue Apr 15, 2018 · 4 comments
Open

Hammer breaks ref in children #93

ibc opened this issue Apr 15, 2018 · 4 comments

Comments

@ibc
Copy link

ibc commented Apr 15, 2018

The ref callback is not called in children elements inside a <Hammer> tag. This did not happen 2 years ago (using older versions of React and react-hammerjs).

It seems that this is broken when using React 16.

ibc referenced this issue Apr 15, 2018
ReactDOM.findDOMNode() is discouraged, so we use refs instead.
This allows us to use this in our server-side render correctly
@ArtemBernatskyy
Copy link

+1

@brianarpie
Copy link

I also ran into this issue. My application relies on the inner refs.

@onelson
Copy link

onelson commented Sep 11, 2018

Ran into this today. Found that the first ref in my render() call didn't fire correctly, but others did.

By trial and error, I eventually found that I could wrap all the children of the <Hammer/> component with an extra div to "swallow" whatever is going wrong, and then all my ref callbacks in the deeper components worked.

Not great, but it's a workaround.

@alekseykarpenko
Copy link

Duplicate of #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants