Repository navigation
[Start]: Would you use TanStack Start for static Landing Pages? #8803
Replies: 3 comments
|
Landing pages work well with Start if you turn on prerendering. Every page gets built to plain HTML at build time, so SEO is fine and you can host it on anything static. Use It’s less mature than Next, so there are fewer examples when you get stuck. Static pages barely touch the trickier parts, though, so I wouldn’t worry much. Build one page first and check the generated HTML to make sure the content and meta tags are there. https://tanstack.com/start/latest/docs/framework/react/guide/static-prerendering |
|
For your goal of learning Start, I'd try one landing page first. Two deployment details to add to the prerendering answer:
For an SEO-critical launch, test the actual static deployment: request each landing-page URL directly, inspect the returned HTML for its main content and route-specific title/description/canonical, and test refreshes on nested paths. Client-side navigation working in development doesn't verify those things. Content fetched during prerendering also needs a rebuild to update the static output. The prerendering docs describe path discovery and explicit pages; the SEO guide covers metadata. Those checks would be my decision gate before moving the remaining pages over. AI-assisted reply, checked against the current documentation; I haven't built your site. |
|
Here is an honest breakdown of using TanStack Start for static landing pages, especially coming to it fresh with SEO and maturity in mind. 1. Can it do the job for SEO?Yes. When static prerendering is enabled, TanStack Start outputs raw, fully formed HTML at build time ( // app.config.ts
import { defineConfig } from '@tanstack/start/config'
export default defineConfig({
server: {
prerender: {
routes: ['/'],
crawlLinks: true,
},
},
})Search engine crawlers (Googlebot, Bingbot) and social crawlers (Twitter, LinkedIn, Slack unfurls) receive pure HTML without executing JavaScript. You manage SEO in routes via export const Route = createFileRoute('/')({
head: () => ({
meta: [
{ title: 'Product Name — High Performance SaaS' },
{ name: 'description', content: 'Clean description for search results.' },
{ property: 'og:title', content: 'Product Name' },
{ property: 'og:image', content: 'https://example.com/og.png' },
],
links: [
{ rel: 'canonical', href: 'https://example.com' },
],
scripts: [
{
type: 'application/ld+json',
children: JSON.stringify({
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Product Name',
url: 'https://example.com',
}),
},
],
}),
component: LandingPage,
})2. The Nuances & Trade-offs You Will EncounterBecause TanStack Start is primarily designed as a full-stack SPA framework with SSR/SSG capabilities, building a static marketing site comes with a few trade-offs compared to dedicated static-site generators: A. Hydration Cost vs. Zero-JS
B. Image Optimization Pipeline
C. Forms and Contact Endpoints
3. When Is TanStack Start the Right Choice?
SummaryIf you want to use this project as a runway to master TanStack Router and Start, it is completely viable for static prerendered landing pages. Just remember to verify your static output in |
Uh oh!
There was an error while loading. Please reload this page.
I want to build several landing pages and thought of using tanstack start as an opportunity to learn it, missed the next.js wave and i got interested in learning this instead, but SEO is critical for me and im not sure if this framework is the right tool for them or just for web apps, maturity is also a concern for me, i don't know how many novel problems i will run into when using this for static prerendered landing pages.
Any comment would help 🙏
All reactions