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

Warning: Hammer: ref is not a prop. Trying to access it will result in undefined being returned. If you need to access the same value within the child component, you should pass it as a different prop. #84

Open
petergab opened this issue Nov 30, 2017 · 2 comments

Comments

@petergab
Copy link

petergab commented Nov 30, 2017

I'm using:

"react": "15.0.1",
"react-dom": "15.0.1",
"react-hammerjs": "1.0.1",

Everything works like a charm, but I get the following error in console:

Warning: Hammer: `ref` is not a prop. Trying to access it will result in `undefined` 
being returned. If you need to access the same value within the child component, 
you should pass it as a different prop.

I think that React deprecated string refs and now only supports callback refs.
https://facebook.github.io/react/docs/refs-and-the-dom.html#legacy-api-string-refs

Probably each instance of a string ref has to be updated to use a callback ref instead.

@tobiaswaltl
Copy link

tobiaswaltl commented Apr 13, 2018

As far as I can see the warning is thrown here where it is tried to access the ref prop directly.

Btw:
If this was working, the ref callback would be executed twice!

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
@fungjj92
Copy link

Bump, seeing this exact issue.

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

3 participants