Client-side routing without server-side rendering in Next.js
For example, I’m making an order tracking page and the service I have to use to pull this order can be relatively slow (~1-3 seconds). Instead of server-rendering this page I’d rather have this page behave more like a traditional client-side rendered page where there’s one static entry point and then the information comes down async via fetch (there is no SEO value either)
I know I can achieve this using query parameters or the hash but I’d rather use the path anyway.
Any ideas?
This question is outside the scope of the Sanity community - it's about general client-side routing patterns rather than Sanity-specific functionality. You'll likely get better answers in a framework-specific community like:
- Next.js Discord/GitHub Discussions if you're using Next.js
- React subreddit or Reactiflux Discord if you're using React Router
- Stack Overflow with appropriate framework tags
That said, if you're building an order tracking system and considering whether Sanity would be a good fit for storing and managing order-related content (like tracking statuses, shipping information, or customer communications), feel free to ask! Sanity can work well for content-heavy aspects of e-commerce systems, though transactional order data typically lives in dedicated e-commerce platforms or databases.
Good luck with your order tracking page!
Show original thread14 replies
Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.