Skip to content

fix: load selected path on code explorer #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2025

Conversation

Balastrong
Copy link
Member

Before

The example page loads the repo default file in SSR, then the client looks for a path search param to load the specified page (if defined).
Navigating to an url with a specified path leads to an empty small div being shown while the path file is loaded client side (look in network tab for fetchFile_createServerFn)
Example: https://tanstack.com/start/latest/docs/framework/react/examples/start-basic?path=examples%2Freact%2Fstart-basic%2Fsrc%2Froutes%2Fposts.%24postId.tsx

After

The path search param is read directly into the loader, hence the right file is loaded during SSR and delivered immediately to the client. No client fetch required.
If no path is specified, falls back to the usual behaviour.

Video

load.mov

Note: Moving head below loader also fixed Route.useLoaderData() types

Copy link

netlify bot commented Aug 9, 2025

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit 8227f02
🔍 Latest deploy log https://app.netlify.com/projects/tanstack/deploys/68974fd83591a3000876a203
😎 Deploy Preview https://deploy-preview-461--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 29 (🔴 down 10 from production)
Accessibility: 98 (no change from production)
Best Practices: 83 (no change from production)
SEO: 95 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@SeanCassiere SeanCassiere merged commit f564338 into TanStack:main Aug 11, 2025
6 checks passed
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.

2 participants