React. How to animate transitions between React Router routes (II)

Learn how to create state-dependent animations when navigating between routes using React Router

Gerardo Fernández
6 min readJan 31, 2020
Photo by Jonas Thijs on Unsplash

In the previous article I told you how we could use the React Transition Group library in conjunction with React Router to create animations when navigating between different routes.

If you have not read that article and arrived here in another way, I recommend that you first take a look:

Since what I will tell here is based on the last example of that article. In it, I created a simple transition between the different routes of the application simulating a slider:

However, as you may have observed, it has a small problem. It does not matter the order in which we navigate

--

--

Gerardo Fernández
Gerardo Fernández

Written by Gerardo Fernández

Entre paseo y paseo con Simba desarrollo en Symfony y React

Responses (7)