XM Cloud & JSS
Building headless Sitecore sites with XM Cloud, JSS and Next.js.
Client-Side API Caching with IndexedDB in Sitecore XM Cloud
Build a small IndexedDB cache with a TTL to stop repeat API calls in a Sitecore XM Cloud Next.js app, and see why it beats localStorage.
Handling Server Error (500) in a Sitecore JSS + Next.js Multisite Setup
Set up a Sitecore-managed 500 page that resolves per site by hostname in a Sitecore JSS Next.js multisite app, with a static fallback.
Part 2: Optimizing Sitecore Context Injection with Caching
Add an in-memory cache keyed by site and language to your Sitecore JSS page-props-factory plugin so global data is not refetched on every request.
Part 1: Enhancing Sitecore JSS with Global Context Data Injection
Inject global configuration data into the Sitecore JSS context with a page-props-factory plugin and read it anywhere with useSitecoreContext.
Implementing Custom 404 Pages in Sitecore JSS Next.js Multisite
Create a custom 404 page in Sitecore and render the right one per site in a Sitecore JSS Next.js multisite app, with a static fallback.
Next.js Scaffolding Script: Simplifying Component Setup and Configuration
Extend the Sitecore JSS scaffold script so one command creates your Next.js component plus its Storybook story and mock-data files.