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: findDOMNode is deprecated in StrictMode #193

Open
bintangyoga opened this issue Dec 28, 2022 · 4 comments
Open

Warning: findDOMNode is deprecated in StrictMode #193

bintangyoga opened this issue Dec 28, 2022 · 4 comments

Comments

@bintangyoga
Copy link

findDOMNode was passed an instance of VisibilitySensor which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node

Fyi, I use this version :
"next": "^13.1.1",
"react-visibility-sensor": "^5.1.1",

@myadzel
Copy link

myadzel commented Jan 10, 2023

#141

@ahmed-khlifi
Copy link

Any updates on this issue ?

@ahmadalfy
Copy link

Any update on this issue?

@bintangyoga
Copy link
Author

Hello everyone,

I've been using react-visibility-sensor for a while and recently noticed a lack of active maintenance, which could potentially pose concerns for its long-term viability. Given this, I wanted to share an alternative that might be worth considering for those facing similar issues.

I came across Framer Motion's useInView functionality, which appears to be actively maintained and robust. The documentation and community support seem promising, offering a viable option for managing visibility in React applications.

While react-visibility-sensor has served its purpose, exploring alternatives like useInView in Framer Motion might ensure more consistent support and compatibility in the long run. It's always beneficial to have reliable, actively maintained libraries for smoother development workflows.

Feel free to check it out and see if it aligns with your project requirements!

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

4 participants