Deploying a React Store on Saleforce Commerce Cloud

Deliver a sub-second React website on Salesforce Commerce Cloud with Moovweb XDN

Created and developed by Facebook, React is one of the most popular open-source JavaScript libraries for building user interfaces or UI components quickly and easily, using a component-based approach. React offers great runtime performance and is fit to be the backbone of complex, revenue-generating websites with heavy traffic, such as eCommerce and Travel websites..

React offers some benefits compared to the other popular frontend frameworks out there, including:

  • Virtual DOM: Nodes are re-rendered only as needed. React compares new data to original DOM and updates the View automatically. This enhances the performance of all-sizes applications that need regular content updates.
  • One-way data binding: React uses one-way data binding with an application architecture called Flux controls. React helps update the View for the user and Flux controls the application workflow.
  • Support for bundling and tree-shaking: This helps minimize the end user’s resource load.
  • Built-in server-side rendering (SSR) support: SSR offers speed gains in specific implementations.

Salesforce Commerce Cloud, formerly Demandware, is a cloud-based solution designed for complex omni-channel retail that can support complex order management and pricing. Salesforce Commerce Cloud is one of the more popular eCommerce backend platforms with three proprietary frontends and two robust APIs available to its customers. SFCC proprietary frontends include: Mobile First Reference Architecture (MFRA) / Storefront Reference Architecture (SFRA) and SiteGensis. MFRA/SFRA has opened up SFCC to modern development practices such as CI/CD, and are an upgrade from the old SiteGenesis storefront. However, this frontend is still jQuery-based mobile site. In addition, the platform does not support the building blocks of speedy page loads, i.e PWA, MP or SSR. In fact, Salesforce Commerce Clouds backend JavaScript engine isn't suitable for SSR. As a result, site speed optimization is left to the platforms' customers, system integrators, designers and developers.  

SFCC offers two APIs are: Open Commerce API (OCAPI) and Commerce Cloud API (CCAPI) which is in beta. 

The Open Commerce API (OCAPI) is a RESTful API used by Salesforce Commerce Cloud which consists of three component APIs:

  • Shop API — Provides access to Commerce Cloud digital storefront functionality
  • Data API — Provides access to digital application configuration and integration functionality on a per object basis
  • Meta API — Provides access to a formal description of the resources and documents available in the Open Commerce API.

OCAPI is a fairly robust API, however if your site is still on Pipelines architecture you may have a harder time integrating your existing customizations with OCAPI. In those cases use synthetic APIs and migrate that functionality to OCAPI at a later date. CCAPI layer in beta seems promising, but it is too early to judge the extent in which it will support speedy headless storefronts. 

Moovweb XDN lets you deliver your React store on SFCC in sub-seconds. The average website on Moovweb XDN sees median pages loads of 320ms, as measured by Largest Contentful Paint (LCP). But the XDN is much more than a website accelerator. It is a Jamstack platform for eCommerce. Moovweb XDN makes websites faster for users and simpler for frontend developers. The platform was built specifically for large-scale,eCommercer websites and comes with the following key benefits: 

  • Jamstack for eCommerce via pre and just-in-time rendering
  • Zero latency networking via prefetching of data from your product catalog APIs
  • An edge that can be configured natively in your React app (CDN-as-JavaScript
  • Edge rules that can be from within your application's routes.js file and run locally, in pre-prod and production environments  
  • Automated, full-stack preview URLs from GitHub, GitLab, or Bitbucket with every new branch and push
  • Performant split plits at the edge for A/B tests that do not slow down the site, canary deploys, and personalization
  • Serverless JavaScript that is much easier and more reliable than AWS Lambda

With the XDN, your React Salesforce Commerce Cloud storefront will run in sub-second speeds and your developers will be empowered to control edge caching and reduce rework using the various developer productivity tools that are part of the platform

Check out Shoe Carnival, a sub-second SFCC site running on the XDN. The shoe retailer has reduced page loads by 92%, outperforms 98% of leading websites, and increased revenue by 40% since launching on Moovweb XDN.

If you're currently using React, use the this guide to deploy your React application on Moovweb XDN and get sub-second loads in as little as 1 hour of work. 

"The Moovweb XDN makes implementing new functionality much easier, hands down, than anything else. It is more flexible, user friendly, and it takes all the guesswork out of deployments and caching.”
Tyler Drone, Sr. Manager of Digital Development

Deploy in minutes

Moovweb XDN works with all frontends
Deploy freeTakes 2 minutes