Transition in react, when navigate to different route.

Hi, I want this transition in react. when click on button the the extra button toggle but with nice transition. https://codepen.io/mozi47/pen/JjZvdyX But in react, when the route changes the transition not working. How I can solve this? when routing from home to page1 the transtion not working. viceversa. https://codesandbox.io/s/amazing-ptolemy-k9kkrc?file=/src/App.js
mozi47
CodeSandbox
amazing-ptolemy-k9kkrc - CodeSandbox
amazing-ptolemy-k9kkrc by mozi47 using react, react-dom, react-router-dom, react-scripts
2 Replies
Joao
Joao2y ago
You will have to use a library like framer-motion to apply transitions while using React. At least in situations like this where components are handled by React and un/mounted from the DOM regularly.
Mozi47
Mozi47OP2y ago
Sure. I will explore that. Btw the problem is solved using css animation.
Want results from more Discord servers?
Add your server