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

Support for React 17 #18

Closed
hichemfantar opened this issue Mar 7, 2021 · 13 comments
Closed

Support for React 17 #18

hichemfantar opened this issue Mar 7, 2021 · 13 comments
Labels

Comments

@hichemfantar
Copy link

hichemfantar commented Mar 7, 2021

React 17 causes this warning:

findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a ref directly to the element you want to reference

Disabling strict mode doesn't fix the issue.

@Steveeeie
Copy link
Owner

Steveeeie commented Mar 13, 2021

Thanks for raising this, I will resolve as soon as possible.

@hichemfantar
Copy link
Author

This might help with fixing the issue:
reactjs/react-transition-group#668

@Steveeeie
Copy link
Owner

Steveeeie commented Mar 14, 2021

@hichemfantar I'm struggling to reproduce the error.

I have successfully updated the advanced demo to use StrictMode and version 17 of React: https://codesandbox.io/s/advanced-react-page-transition-demo-z8hmd.

I have also successfully updated the basic demo to use StrictMode and version 17 of React:
https://codesandbox.io/s/basic-react-page-transition-demo-rk0uv

@hichemfantar
Copy link
Author

Weird, It's working now. Maybe it's because I'm using node 12 now instead of 14 like I was before.
I'll test it again with node 14 and get back to you asap.

@hichemfantar
Copy link
Author

hichemfantar commented Mar 14, 2021

Ok it seems like It's working on both now. Have no idea what I messed up previously.
Anyway, Now the warning appears in the console in strict mode however the app continuers to function normally despite the warning, also disabling strict mode makes the warning go away.

@Steveeeie
Copy link
Owner

Thank you for looking into this for me.

I'm seeing the console warning too, i will try to resolve it this week.

@hichemfantar
Copy link
Author

Cool man, looking forward to the fix!

@antonnystedt
Copy link

I still get this error.

@hichemfantar
Copy link
Author

Apparently this is an issue with react-transition-group
@Steveeeie can't fix it unless a fork is made of react-transition-group with the new API or this package gets rewritten on top of a different animation library.

@hichemfantar
Copy link
Author

hichemfantar commented May 16, 2022

Apparently there's no official fix for this and all the workarounds have certain pitfalls.
I believe it would be better to port the library to Framer Motion.
These are some nice resources:
https://stackoverflow.com/questions/70239122/react-router-dom-v6-with-framer-motion-v4
https://www.geeksforgeeks.org/page-transition-in-react-js-using-framer-motion/
https://www.framer.com/docs/guide-upgrade/#50

@Steveeeie
Copy link
Owner

That's not a bad shout. I have a lot of experience with Framer Motion. Switching to it would remove a lot of the configuration and make the whole thing a lot more plug and play.

@hichemfantar
Copy link
Author

Looking forward to the switch to framer motion, I believe you'll bump this library to the next major version since it would probably be incompatible with the previous release.
I don't have a lot of experience with framer motion but I'll be glad to help in anyway i can.

@Steveeeie Steveeeie added the v2 label Sep 23, 2022
@Steveeeie
Copy link
Owner

See: #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants