router icon indicating copy to clipboard operation
router copied to clipboard

Route component not showing

Open Maquinours opened this issue 1 year ago • 0 comments

Describe the bug

After clicking on a link with has its preload as intent and the route does not have the time to load, the new route component will not show.

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-sb9dg1?file=src%2Frouter.tsx

Steps to Reproduce the Bug or Issue

Download the project and run it. Open it and restrict your connection to "slow 3g" then click on "enterprises" link. If you click instantly without leaving the time to the preload to end, then it will show you nothing, as if there wasn't a component associated to the link.

Expected behavior

It should show the loader component and then, when the loader has finished, show the route component.

Screenshots or Videos

https://gyazo.com/ada043a794530f4d4c044512523b18f1

Platform

  • OS: Windows
  • Browser: Chrome/Firefox
  • Version: 1.32.12

Additional context

In this case, we need to use a restricted connection so the preload does not have the time to load before we click. In routes that has bigger components, the issue happens even with a good connection cause it couldn't load huge routes before we click.

Maquinours avatar May 20 '24 13:05 Maquinours