motiondivision / motion

A modern animation library for React and JavaScript
https://motion.dev
MIT License
25.85k stars 849 forks source link

[FEATURE] Request for Polyfill or Workaround for mode="popLayout" in React 16.14.0 with framer-motion @ 6.5.1 #2717

Closed LAWTED closed 4 months ago

LAWTED commented 4 months ago

Is your feature request related to a problem? Please describe. I am working on a large project that uses React 16. We are encountering limitations with animation capabilities, specifically the absence of the mode="popLayout" feature from the newer versions of Framer Motion. I'm always frustrated when the UI does not transition as smoothly as it could with the latest animation features, impacting the overall user experience.

Describe the solution you'd like I would like a polyfill, backward compatibility layer, or any workaround that allows the use of mode="popLayout" animations in Framer Motion while running React 16. This feature would enable us to improve our application's interactivity and visual flow without needing to refactor our entire project to a newer React version.

Describe alternatives you've considered

Additional context The mode="popLayout" feature significantly enhances the way components enter and exit the DOM, making transitions appear more fluid and connected. Implementing this in our React 16 setup would greatly enhance our application's UX.

mattgperry commented 4 months ago

Hey @LAWTED, I understand the desire for this but I'm closing the ticket as I don't see it happening.

I think one, I want to avoid getting into the situation where there's some weird splintered version and having to support that as well. And two, this feature actually relies on multiple hooks only present in React 18 and so I don't want to re-engineer that side of things either.