chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.69k stars 1.16k forks source link

Preact compatibility #480

Open followdarko opened 7 years ago

followdarko commented 7 years ago

I use abstraction over react-motion https://github.com/maisano/react-router-transition/ to control routing with react-router4 and encountered with optimization problem. In the React everything is fine, but with Preact (aliases preact/preact-compat in webpack) the route starts rendering a lot of times until animation finishes. By debugging I found that the problem in the TransitionMotion methods willEnter/willLeave which are responsible for the animation. Do not understand why the React and Preact handle these case in different ways. btw, I tried to switch to preact-motion and the story is the same.

I don't know maybe it's Preact problem, well, if so, please let me know.

nkbt commented 7 years ago

Had no experience with preact and did not have any plans to. Same story with react-router. Cannot help, unfortunately. Maybe someone else has some ideas...