router icon indicating copy to clipboard operation
router copied to clipboard

fix(react-router): do not wrap children in outlet in suspense unless (default)pendingComponent is configured

Open schiller-manuel opened this issue 1 year ago • 7 comments

schiller-manuel avatar Jul 26 '24 21:07 schiller-manuel

☁️ Nx Cloud Report

CI is running/has finished running commands for commit bc811688fd3e9e8d549a441a5cf37f90d2694bb8. 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


🟥 Failed Commands
nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build --parallel=3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Jul 26 '24 21:07 nx-cloud[bot]

commit: bc81168

@tanstack/history

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

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

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

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

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

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

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

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

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

pnpm add https://pkg.pr.new/@tanstack/router-valibot-adapter@2035
@tanstack/router-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2035
@tanstack/router-zod-adapter

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

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

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

Open in Stackblitz

More templates

pkg-pr-new[bot] avatar Jul 26 '24 21:07 pkg-pr-new[bot]

This would resolve https://github.com/TanStack/router/issues/2030 yes? Since the user would now be able to add their own pendingComponent on the root route.

SeanCassiere avatar Jul 27 '24 00:07 SeanCassiere

it maybe solves https://github.com/TanStack/router/issues/2026

schiller-manuel avatar Jul 27 '24 05:07 schiller-manuel

it maybe solves #2026

Whoops, my bad, linked the wrong issue.

SeanCassiere avatar Jul 27 '24 06:07 SeanCassiere

@tannerlinsley please have a look if omitting this suspense is ok, check #2026 for the motivation.

one thing I dislike is that there is no way to opt out of suspense here if defaultPendingComponent is set.

schiller-manuel avatar Jul 27 '24 10:07 schiller-manuel

Is there anything I can do to move this along? Maybe we could merge the first commit which I would consider less of a breaking change?

lukasgeiter avatar Aug 15 '24 08:08 lukasgeiter

@SeanCassiere @schiller-manuel @tannerlinsley Is there any chance of getting at least the first commit merged? That would allow me to work around this bug without having to patch the package itself.

lukasgeiter avatar Nov 20 '24 10:11 lukasgeiter

Any updates on getting this merged? We would really appreciate it, some workarounds are getting messy!

dy0gu avatar Apr 30 '25 14:04 dy0gu