Skip to content

Show loading bar on initial load#3285

Open
david-crespo wants to merge 2 commits into
mainfrom
loading-bar-init
Open

Show loading bar on initial load#3285
david-crespo wants to merge 2 commits into
mainfrom
loading-bar-init

Conversation

@david-crespo

Copy link
Copy Markdown
Collaborator

I kinda thought we did this already, but apparently not. So I was curious what it would take. The first commit just moves the loading bar component to its own file without making any changes, and then the second commit makes the change. It's mildly interesting because in order for the loading bar to not get swapped out when the initial loader completes (and the skeleton fallback gets replaced with the actual app), it needs to be rendered outside of the router provider but it still needs to listen to routing events, so it uses useSyncExternalStore to subscribe to events on the router.

I can live without it — it's kind of nice, but an animation on the skeleton itself (and the middle not being so empty) might be better.

2026-07-08-loading-bar-init.mp4

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview Jul 8, 2026 9:51pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant