Double navigation

Is there a way to navigate twice. I want to navigate to a route quickly to add it to the history and then instantly navigate to the target. This worked in react-router-dom, but now the only way i can manage to get it working is leaving a dangling timeout with wait 0.

Any ideas why this does not work or how i can fix it?
Was this page helpful?