I'm having issues on page transition animation using Reach-Router Not React-Router, GSAP, and React-Transition-Group in combination.
I did research and found example on page-transition animation using Reach-Router and React-Transition-Group
https://reach.tech/router/example/animation
This example uses CSS to animate, But I wanted to animate it with GSAP and it uses is pure JavaScript not CSS. So, it mean I wouldn't need to use TransitionGroup
and CSSTransition
.
Later on I found another example on page transition animation with GSAP.
https://stackblitz.com/edit/gsap-react-route-animation
But it uses react-router not reach-router. Since react-router and reach-router look almost close to each other. I decide to go on my own experiment starting with GSAP, RTG and React-Router so I can have better understanding how it work... Here's my sandbox.
https://codesandbox.io/s/react-router-gsap-pgu24
Animation worked! Then, I did another experiment getting exactly copy of code and convert some area to make it compatible with Reach-Router. Here's my sandbox.
https://codesandbox.io/s/reach-router-gsap-h5rny?fontsize=14
Everything works except for animation. Its been struggling for me to find what's the problem and I not understanding here. Did I missing something? Please need help?