react-transition-group icon indicating copy to clipboard operation
react-transition-group copied to clipboard

React Transition Group/ with React Router example to be updated with React Router v.6

Open PoliGanina opened this issue 3 years ago • 1 comments

What is the current behavior?

The given example on page of React Transition Group [https://reactcommunity.org/react-transition-group/with-react-router] is based on previous version of React Router. When I use the code from example, even with Router v.6 updates, there is a bug, the animation of transition doesn't work. It works like a regular router.

What is the expected behavior?

the animated transition should appear

Could you provide a CodeSandbox demo reproducing the bug?

CodeSanbox demo https://codesandbox.io/s/romantic-brook-z5zujp?file=/src/index.js

PoliGanina avatar Jul 01 '22 08:07 PoliGanina

The React Router example is also not functional in React StrictMode. It's advised on other issues to use nodeRef to avoid findDOMNode but it doesn't work when you follow the advice at https://reactcommunity.org/react-transition-group/with-react-router.

I think that page really could use an update!


By the way @PoliGanina your link somehow doesn't lead where you'd think - but here's a fixed version: https://codesandbox.io/s/romantic-brook-z5zujp?file=/src/index.js

Nantris avatar Sep 13 '22 21:09 Nantris