Skip to content

v1.117.1 Renders Blank Screen Before Pending Component #4759

Description

@Carlwirkus

Which project does this relate to?

Router

Describe the bug

After upgrading to the latest version of router, I've noticed that there's a screen flash (to an empty screen) before the pending component renders.

The issue seems to be from this PR: https://github.com/TanStack/router/pull/4044/files

Reproduction:
https://github.com/Carlwirkus/router-117.1-bug

The red screen should never appear.

Your Example Website or App

https://github.com/Carlwirkus/router-117.1-bug/blob/main/src/main.tsx

Steps to Reproduce the Bug or Issue

  1. npm install
  2. npm run dev
  3. Observe the loading states:
    • Blue (index.html fallback)
    • Red <-- this is the bug
    • Yellow (pending comonent)
    • Green (route loaded)

Expected behavior

The red screen should never appear (it's a background colour around the RouteProvider). The route provider must be returning null for a period before it renders the pending component. This works on 1.117.0 and is broken in 1.117.1.

Screenshots or Videos

https://www.loom.com/share/9bda2fdbe0ac4e629d41855b5c66c6ac

Platform

  • Router 1.117.1

Additional context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions