Skip to content

Conversation

BennyHinrichs
Copy link

@BennyHinrichs BennyHinrichs commented Sep 12, 2025

Let me know if you think this is an alright addition to the SPA Mode page. I spent like a whole day trying to get SPA mode to work without an FE server before asking in the Discord and learning that that is antithetical to the ethos of Start. Something akin to this would have saved me a lot of time by directing me to Router alone much sooner.

After the first sentence, there could also be another sentence added explaining

Loader functions in your __root.tsx file will still run on the server on startup in SPA mode.

I left it out because I didn't know if it was overexplaining.

Another option is maybe adding a sentence in the Why use Start without SSR? section to clarify better. I guess what I'm looking for is something on the SPA docs specifying that Start is an obligate server environment and enabling SPA doesn't opt you out of that, it merely changes how you interact with said server. I.e., if you want to bring your own server, you must daisy chain it to the Start server.

My position is that I'm in a company with a large Java backend. They would like us to rewrite the FE, but they don't want to add infra for an FE server. Ergo, I saw SPA mode and thought that I could use Start, but such is not the case.

Summary by CodeRabbit

  • Documentation
    • Added a new "Pure SPA" section to the SPA mode docs (placed after caveats).
    • Clarifies that SPA mode still involves a frontend server (TanStack Start).
    • Recommends TanStack Router for setups requiring no frontend server, with a link included.
    • Prerendering steps and configuration guidance remain unchanged.
    • No code or public API changes.

Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Walkthrough

Adds a new "Pure SPA" subsection to the React SPA mode documentation clarifying that SPA mode still involves a frontend server (TanStack Start) and recommending TanStack Router for a no-frontend-server SPA. No code or public API changes.

Changes

Cohort / File(s) Summary of changes
Docs: React SPA mode
docs/start/framework/react/spa-mode.md
Inserted a "Pure SPA" section after the caveats explaining SPA mode's use of a frontend server (correctly named "TanStack Start") and pointing readers to TanStack Router for pure client-only SPAs. No other content, code, or public API changes.

Sequence Diagram(s)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely describes the primary change in the PR: adding a "Pure SPA" section to the SPA Mode documentation page, which matches the changes in docs/start/framework/react/spa-mode.md and the PR description. It is specific, free of noise, and lets a reviewer scanning history understand the main intent without listing files or extraneous details. The phrasing is appropriate for a documentation change and aligns with typical PR title conventions.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I hop through docs with careful cheer,
A tiny note to make things clear—
TanStack Start still runs the show,
For pure client SPAs, Router's the go. 🥕

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83dd936 and ecc9c42.

📒 Files selected for processing (1)
  • docs/start/framework/react/spa-mode.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/start/framework/react/spa-mode.md
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the documentation Everything documentation related label Sep 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/start/framework/react/spa-mode.md (1)

25-28: Clarify “Pure SPA” to avoid implying a required frontend server at runtime; add cross-links.

The current wording can be read as “SPA mode still uses a frontend server for the initial document,” which conflicts with the CDN-only messaging above. Suggest replacing the paragraph and adding a note that points to the sections below.

 ## Pure SPA
 
-SPA mode does not mean there is no frontend server; it's just a different way for the client to interact with your frontend (i.e., TanSatck Start) server. If you need to do an SPA with no frontend server, then [TanStack Router](https://tanstack.com/router/latest) will be a better fit for your project.
+SPA mode doesn’t mean “no Start.” It generates a static shell and assets you can host on a CDN. You can still optionally deploy TanStack Start server functions or server routes for backend capabilities. If you want a client‑only SPA with no Start server/runtime, use [TanStack Router](https://tanstack.com/router/latest).
+
+> [!NOTE]
+> If you’re mixing SPA mode with server capabilities, see [Allowing Server Functions and Server Routes](#allowing-server-functions-and-server-routes). For how data can appear in the shell during prerender, see [Dynamic Data in your Shell](#dynamic-data-in-your-shell).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca84fb0 and 83dd936.

📒 Files selected for processing (1)
  • docs/start/framework/react/spa-mode.md (1 hunks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Everything documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant