How to make react router replace component only after the matched route asynchronously loaded..?

twitter logo github logo ・1 min read

So here's the situation - When a Link is clicked the nprogress bar will start and I want react-router to only replace the current component with the matched route once that's done loading asynchronously.. just like in instagram..

enter image description here

But I am only getting this -

enter image description here

I didn't find a solution to this anywhere on the internet.. so I am asking this question here in dev. I am hoping someone here can solve this.

twitter logo DISCUSS (5)
markdown guide

I think React Transition Group is something you are looking for


Can you share sample helps us finding solutionπŸ’ͺπŸ˜„πŸ‘Œ


I'm trying to solve this issue. In ours project we have implemented react-lodable. Your facing flicker issue. Definitely solution is to provide delay in 5000.

Classic DEV Post from Feb 5

Clean up your code with these tips!

Learning new patterns to make your code smaller, and more clear.

Ruhul Amin profile image
Freelancer | Frontend Web Developer(React focused). Creating beautiful websites, apps, themes for businesses and individuals. Open to opportunities.

Thanks for visiting

A Beginner's Guide to