snakesilk / react-fullscreen

Fullscreen helper component for React.
https://www.npmjs.com/package/react-full-screen
MIT License
280 stars 33 forks source link

I'm getting an error in my console #66

Closed danchistyakov closed 3 years ago

danchistyakov commented 3 years ago

I'm getting an error in my console. Error: Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

pomle commented 3 years ago

Please provide example and reopen.

danchistyakov commented 3 years ago

Hello, here is a pen (it's a small example): Demo: https://logqz.csb.app/ CodeSandbox: https://codesandbox.io/s/gallant-hoover-logqz?file=/src/App.js

pomle commented 3 years ago

Hello!

This is not an issue with this library. But you can access the DOM Node ref via the node prop on the handle as described here: https://github.com/snakesilk/react-fullscreen#types