fix(solid-router): respect wrapInSuspense - #7898
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSolid Router’s ChangesSolid Router suspense handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #7829.
Solid Router always rendered matches inside
Solid.Suspense, sowrapInSuspense: falsedid not prevent a route pending component from being used as the suspense fallback. This keeps the existing default behavior, but switches toSafeFragmentwhen a route explicitly opts out.I added a regression test for a pending child route with
wrapInSuspense: falseand an unresolved loader, while preserving the existing root pending component behavior.Tests run:
PATH=/opt/homebrew/bin:$PATH pnpm --dir packages/solid-router exec vitest run tests/Matches.test.tsx --reporter=dotPATH=/opt/homebrew/bin:$PATH pnpm --dir packages/solid-router test:types:ts70PATH=/opt/homebrew/bin:$PATH pnpm --dir packages/solid-router test:eslintPATH=/opt/homebrew/bin:$PATH pnpm exec prettier --check packages/solid-router/src/Match.tsx packages/solid-router/tests/Matches.test.tsxSummary by CodeRabbit
New Features
Bug Fixes