Skip to content

fix(react-router): pendingComponent not rendering with preload='intent'#2247

Merged
schiller-manuel merged 3 commits intoTanStack:mainfrom
MaciejGarncarski:fix-intent-preload-pendingComponent
Sep 3, 2024
Merged

fix(react-router): pendingComponent not rendering with preload='intent'#2247
schiller-manuel merged 3 commits intoTanStack:mainfrom
MaciejGarncarski:fix-intent-preload-pendingComponent

Conversation

@MaciejGarncarski
Copy link
Copy Markdown
Contributor

Hi, I tried fixing this issue #2008. If route had preload: 'intent' enabled, the pendingComponent would not show, UI just waited for promise to end, and then it would switch route. I found out, that triggerOnReady() in router.ts weren't used if route had beforeLoadPromise or loaderPromise to await for.

2024-09-02.11-26-50.mp4
2024-09-02.11-28-48.mp4

@MaciejGarncarski MaciejGarncarski changed the title Fix intent preload pending component fix(react-router)(issue-2008): pendingComponent not rendering Sep 2, 2024
@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Sep 2, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b46d5cc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Sep 2, 2024

Open in Stackblitz

More templates

@tanstack/react-cross-context

pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2247

@tanstack/history

pnpm add https://pkg.pr.new/@tanstack/history@2247

@tanstack/react-router

pnpm add https://pkg.pr.new/@tanstack/react-router@2247

@tanstack/react-router-with-query

pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2247

@tanstack/router-arktype-adapter

pnpm add https://pkg.pr.new/@tanstack/router-arktype-adapter@2247

@tanstack/router-cli

pnpm add https://pkg.pr.new/@tanstack/router-cli@2247

@tanstack/router-devtools

pnpm add https://pkg.pr.new/@tanstack/router-devtools@2247

@tanstack/router-generator

pnpm add https://pkg.pr.new/@tanstack/router-generator@2247

@tanstack/router-plugin

pnpm add https://pkg.pr.new/@tanstack/router-plugin@2247

@tanstack/router-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2247

@tanstack/router-valibot-adapter

pnpm add https://pkg.pr.new/@tanstack/router-valibot-adapter@2247

@tanstack/start-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2247

@tanstack/start

pnpm add https://pkg.pr.new/@tanstack/start@2247

@tanstack/router-zod-adapter

pnpm add https://pkg.pr.new/@tanstack/router-zod-adapter@2247

commit: b46d5cc

@schiller-manuel
Copy link
Copy Markdown
Contributor

can you please add a unit test that reproduces this issue?

@SeanCassiere SeanCassiere changed the title fix(react-router)(issue-2008): pendingComponent not rendering fix(react-router): pendingComponent not rendering with preload='intent' Sep 2, 2024
@SeanCassiere SeanCassiere linked an issue Sep 3, 2024 that may be closed by this pull request
@schiller-manuel schiller-manuel merged commit fe08fb5 into TanStack:main Sep 3, 2024
@MaciejGarncarski MaciejGarncarski deleted the fix-intent-preload-pendingComponent branch September 3, 2024 07:43
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.

Intent-based loading prevents pendingComponent from showing.

3 participants