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.
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...
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.