DEV Community

Developer Ruhul
Developer Ruhul

Posted on

2 1

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

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.

Top comments (5)

Collapse
 
dukemai profile image
dukemai β€’

I think React Transition Group is something you are looking for

Collapse
 
sagar profile image
Sagar β€’

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

Collapse
 
developerruhul profile image
Developer Ruhul β€’

did u find any solution??

Collapse
 
sagar profile image
Sagar β€’

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.

Collapse
 
developerruhul profile image
Developer Ruhul β€’

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more