Building quality web experiences that compel shoppers to make a buying decision is hard.
There are more tools than ever before, but having these tools work well together isn’t easy. There have never been more valuable ecommerce APIs and services available, but housing them under one roof can lead to fragmented sites that provide a suboptimal customer experience.
That’s why Gatsby JS was created. The platform provides a React JS-based framework that makes it Gatseasy to bring disparate APIs and systems together on one site, making for a singular ecommerce experience for customers.
Gatsby empowers ecommerce developers to build sites quicker, deploy seamlessly and reduce security vulnerabilities. That enables ecommerce companies the capacity to leverage any API to enhance the purchase path.
The platform is steadily increasing its market share as well, almost doubling the number of sites it serves in the last two years. Now, more than 228,000 sites use Gatsby, including BigCommerce client Ubisoft.
Strictly technically speaking, Gatsby is an open-source static website generator (SSG) that is based on the frontend development framework React and makes use of Webpack and GraphQL technology. It can be used to build static sites that are progressive web apps, follow the latest web standards and optimized for speed and security.
In layman’s terms, it makes sure a bunch of programs play nice together so your website works right.
Gatsby also offers a variety of rendering options, making it a flexible option with multiple use cases.
The Gatsby SSG is a more flexible option than traditional database-driven content management systems such as Wordpress or Drupal. Gatsby loads JSON from GraphQL, merges data and creates an HTML page that is deployed to the server as static files. This reduces the latency that sites run by databases experience.
Gatsby allows sites to defer non-critical page generation to increase load times. This allows developers to generate only the most important pages during a build. Less trafficked pages are then rendered only when accessed by site users. This is especially useful for large and complex sites.
SSR allows sites to pre-render pages with content when a page is visited. In general, SSG and DSG are considered preferable options, but SSR does have use cases. Pages that require personalization or location-specific data are better handled by SSR.
GraphQL is a query language for APIs that responds to data requests. These requests can be structured declaratively to query APIs for exactly what is needed, without involving unnecessary data.
Gatsby offers multiple paths to site building. It’s designed to connect to third-party applications and is customizable, but also offers new users easy to use templates to get them started.
Gatsby offers three development methods: plugins, themes and starters.
Gatsby includes basic site functionality that is easily integrated as Node.js packages. Common plugins include analytics platforms, responsive content and SEO enhancements.
Gatsby themes expand on plugins to create themes that include pre-configured features, data sourcing and code to sites. All data configuration is compiled into an installable package, making integration simple.
Gatsby starters are standard templates that can be reused and customized. These are used to build the foundation of sites and can be fully built-out sites or just the skeleton of one.
Gatsby leverages several key features to deliver fast sites that are developer-friendly and supported by a large base of users.
Gatsby sites are built with performance at top of mind. By pre-rendering pages and reducing the need for servers to generate pages, the end user experience is considerably improved.
In one test, the Gatsby SSG loaded twice as fast as a React application and five times as fast as a highly complex site.
Gatsby has an extensive plugin ecosystem, powerful integrations and excellent documentation. Its extensive open source community has already created more than 2,000 plugins and a massive presence on GitHub.
If a developer has a problem, it’s very likely that the community has already created a solution for it.
By design, the platform easily integrates third-party platforms, allowing developers to quickly load data from any source. This makes for a better user experience and flexibility during the development process.
Using just React, a route would have to be built for components. With Gatsby, though, having a component in a pages folder generates the page automatically, removing the need for a router or switch.
A headless CMS decouples the content repository from the presentation layer, allowing content to be deployed across any frontend, separate from the backend.
They’re better used for sites with multiple digital touchpoints, like modern ecommerce sites. Gatsby works well with most headless platforms.
Gatsby is not a finished product — and it may never be. As an open-source platform, Gatsby is always evolving and becoming ”new Gatsby,” which means that the tool is in a constant state of flux and can be difficult to work with.
Gatsby does a lot, which means there’s a lot to learn. Fully understanding the platform and how to leverage it to its fullest can take hundreds, if not thousands, of development hours. There is significant documentation and multiple tutorials to get your started with the Gatsby project.
Having support from a robust community means that there are thousands of plugins and starters available. However, governance and testing of these can be dubious. There are some builders that have the trust of the community — and then there are some that don’t. The buyer should beware.
The more complex the site, the slower the build time and deployment is. However, updates to the platform are cutting this down significantly. Gatsby Cloud Builds uses caching and incremental builds to complete site builds in seconds.
New use cases for Gatsby are expanding, but here are three prominent use cases — including one commerce-specific use case in headless commerce.
Gatsby delivers a PWA-like experience because it pre-renders sites — there’s no server-side code or database. Once it’s loaded, React takes over to deliver an app-like browsing experience.
Out-of-the-box optimization that comes along with Gatsby includes splitting code bundles, lazy-loading routes, pre-fetching important assets and inlining critical CSS.
Gatsby’s content mesh approach works well with a headless CMS. Increasingly, ecommerce platforms are adopting this approach to provide maximum flexibility in deploying content to multiple channels. Gatsby excels at supporting this.
Most ecommerce sites that use Gatsby do so for the advanced React framework, the need to optimize performance and and require a framework that works well with legacy systems. Sites that are considering Gatsby need to ask further questions, however, before jumping in.
Static sites are ideal for large platforms with a significant amount of content that don’t change often. Working with an established CMS is recommended.
By complex, we mean sites with a significant amount of content that frequently changes. It might feature multiple APIs on the homepage alone that may slow build times and potentially negatively impact the user experience.
If you do, Gatsby enables developers to create client-only routes that require authentication.
Gatsby is increasingly popular with ecommerce developers, who cite the React framework and community support as differentiators. The platform is flexible, extendable and works well with modern headless CMSs to deliver on almost any need.
The Gatsby SSG also works seamlessly with BigCommerce to build quick, robust storefronts to remove friction in the purchase path. It easily compiles BigCommerce Catalog, Cart and Checkout and other APIs like Stripe into a single platform that gives the end user exactly what they want and how they want it.
Gatsby easily integrates BigCommerce (and other) APIs into a single, unified platform. It brings unconnected datasets into a single site that loads quickly and gives the end user a seamless experience.
For small sites, yes. For larger sites, Gatsby offers multiple pricing levels.
That depends on your ecommerce store needs. Gatsby works best with sites that want to leverage React and need to use multiple API keys.