Skip to main content

Command Palette

Search for a command to run...

Key Differences Between Sitecore JSS and Content SDK

Updated
2 min read

Sitecore has released the production-ready version of the Content SDK for XM Cloud, Content SDK 1.0. This modern, lightweight, and scalable foundation enables developers to build composable digital experiences on XM Cloud. The GitHub Starter Kit project based on JSS has been archived, and Sitecore now recommends that developers adapt to the Starter Kit project built on the Content SDK.

Before upgrading from JSS to Content SDK, it is crucial to understand the new features introduced in Content SDK 1.0, as well as the technical differences between Content SDK and Sitecore JSS.

Features of Content SDK

Unified Sitecore client - Content SDK introduces a unified Sitecore client to handle all Sitecore interactions, including Layout, Dictionary, Robots, Sitemap, Personalize, Editing, SiteInfo and Error services.

Unified configuration - centralized config files (sitecore.config.ts and sitecore.cli.config.ts) streamline both build-time and runtime behaviour.

Composable middleware - the new defineMiddleware utility introduces a modular, transparent approach to request handling.

Environment variable standardization - variables have been renamed for clarity and consistency.

Cleanup of Experience Editor Related Methods - Content SDK doesn't support the Experience Editor tool and, for that reason, doesn't include the chromes-based integration required by Experience Editor. Instead, all visual editing with Content SDK is done with the XM Cloud page builder using metadata integration.

Differences Between JSS and Content SDK

  • Most of the JSS scripts and folders have been replaced by centralized configuration files and new CLI commands in the Content SDK. Key build and scaffolding processes are now handled by sitecore.config.ts, sitecore.cli.config.ts.

  • sitecore-tools:build command is introduced to Generate build time artifacts.

  • Various custom plugins, config types, and service factories in the src/lib folder have been replaced or moved to new centralized functions and types within SitecoreClient and the Content SDK’s Next.js package.

  • All middleware is now defined in middleware.tsx and executed using the defineMiddleware utility function.

  • SitecoreContext Interface is replaced with the new Page interface in SitecoreClient.

  • The getServerSideProps and getStaticProps methods have been replaced by the new getComponentServerProps method.

  • All interface and class names that previously used the prefixes Rest or GraphQL have been updated to remove these prefixes.

Environment Variable Updates

JSSContent SDK
SITECORE_API_KEYNEXT_PUBLIC_SITECORE_API_KEY
SITECORE_API_HOSTNEXT_PUBLIC_SITECORE_API_HOST
SITECORE_SITE_NAMENEXT_PUBLIC_DEFAULT_SITE_NAME
DEFAULT_LANGUAGENEXT_PUBLIC_DEFAULT_LANGUAGE
JSS_EDITING_SECRETSITECORE_EDITING_SECRET
SITECORE_EDGE_URLNEXT_PUBLIC_SITECORE_EDGE_URL
SITECORE_EDGE_CONTEXT_IDNEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID

Interface Name Updates

SitecoreContextPropsSitecoreProviderProps
SitecoreContextStateSitecoreProviderState
SitecoreContextReactContextSitecoreProviderReactContext
WithSitecoreContextOptionsWithSitecoreOptions
WithSitecoreContextPropsWithSitecoreProps
WithSitecoreContextHocPropsWithSitecoreHocProps

References

https://developers.sitecore.com/changelog/xm-cloud/25072025/sitecore-content-sdk-v1.0.0---official-stable-release

https://doc.sitecore.com/xmc/en/developers/content-sdk/migrate-jss-22-8-next-js-apps-to-content-sdk-1-0.html

More from this blog

Sitecore Pulse

15 posts