react-hammerjs
react-hammerjs copied to clipboard
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'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.
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!
Bump, seeing this exact issue.