Gatsby JS Pros and Cons
Tags: gatsby, jamstack, webdev
Published: 2021-05-18 14:03:52

<!-- wp:heading -->
<h2>Introduction</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Companies are looking for modern solutions to problems with their websites like slow page load speed, bad SEO or inability to improve user experience. The demand for such solutions grows because competition online is tough, and every business wants to beat the rest.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As a result, there are many technologies and frameworks to choose from that can help these companies overcome their challenges. One of them is <a href="https://pagepro.co/gatsby-development.html" target="_blank" rel="noreferrer noopener">GatsbyJS</a>, and today, we would like to present its pros and cons so you can decide whether it can solve your problems, too.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br><br>What is GatsbyJS?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In short, Gatsby is a <a href="https://pagepro.co/react-development.html" target="_blank" rel="noreferrer noopener">React</a>-based free and open-source framework that helps developers build blazing-fast websites and applications. It offers built-in performance, scalability and security.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Developers love this static site generator for its great documentation and using modern tech stack that’s future-proof. However, it’s also loved by business owners and marketers, and soon you will find out why.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br><br>When to use GatsbyJS?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you want to answer this question, first you must think about your goals. What do you want to achieve by using GatsbyJS for the next project?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Then check your answers with goals that you can achieve with GatsbyJS:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Increase in conversion and sales</li><li>Boost in marketing efficiency</li><li>Overtaking competition online</li><li>Better user experience</li><li>Lower maintenance costs</li><li>Easier business scalability</li></ul>
<!-- /wp:list -->

<!-- wp:image {"id":5363,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2021/02/when-to-use-gatsby.png" alt="When to use Gatsby?" class="wp-image-5363"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Is there at least one match? If yes, you can move on to the next part.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If not, you can talk with us anyway to see if Gatsby will help you achieve your goals.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br><br>What can you build with Gatsby?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Deciding on using Gatsby is also correlated with what you want to build. There are some best use cases for Gatsby:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>PWA (Progressive Web Apps)</li><li><a href="https://pagepro.co/jamstack-development.html" target="_blank" rel="noreferrer noopener">JAMstack websites</a></li><li><a href="https://pagepro.co/custom-storefront-for-headless-ecommerce.html" target="_blank" rel="noreferrer noopener">Static eCommerce storefronts</a></li><li>Headless eCommerce platforms</li><li>Performant marketing pages</li><li>Super-fast digital business page</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2><br><br>Pros of Gatsby</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Gatsby gains popularity thanks to many benefits offered for developers and business owners and marketers. Regardless of your position in the company, it’s worth knowing all benefits as at least one of them may be a deciding factor in choosing Gatsby for the next project.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color">Pros of Gatsby for business owners</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Every business is profit-oriented because money is like oxygen for companies. However, Gatsby brings more than just money to the table for business owners.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Fast page load speed</strong> – bounce rate from loading a page is quite high nowadays (as you can see on a screen below), so you have to make sure that visitors will actually check the value you deliver on your website.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://lh3.googleusercontent.com/rNQzvC4NIAmYkEnf8ExVK6_ki7w3Q2bCwLc7hzJbFREhQLrkyfo3epbwgI5BgbLzMPKJ91QSHV2XwgtzZoZ9TsTmUBcqkS5tg5jEZtpBacUgsIpij43Y1AqSpPgnPNcqqvjBJpML" alt="Probability of bounce as page load time increases"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p><strong>SEO efficiency</strong> – don’t believe those saying that SEO is dead. They have been saying that for the past few years and still organic search traffic brings money and high ROI for those investing in it. And investing in Gatsby means investing in SEO as Gatsby websites are SEO-efficient thanks to their performance, and being lightweight and easy to scan for Google robots. More on SEO below.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>More leads and customers</strong> – as websites built on JAMstack architecture are faster and SEO-efficient, it results in getting more leads and customers from the website. To learn more, check out <a href="https://wpostats.com/" target="_blank" rel="noreferrer noopener nofollow">how important is the speed in business.</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Security</strong> – businesses in the digital world are more and more aware of the importance of cybersecurity. However, it also becomes more and more difficult to make websites secure. Gatsby may be a solution as it is a static site generator, and static websites are more secure than dynamic websites.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Future-proof</strong> – because “every website is an app, and every app is a website”, using Gatsby means that the website ore app will stand the test of time. Therefore, you won’t have to invest in another technology for at least a few years.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Low hosting costs</strong> – costs of hosting Gatsby websites start from $0 (Netlify Starter Package) as they are lightweight and don’t take much storage space.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":5366,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2021/02/Pros-of-Gatsby-for-business-owners.png" alt="Pros of Gatsby for business owners" class="wp-image-5366"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color">Pros of Gatsby for marketers</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>When marketers find out about Gatsby, it’s love at first sight. Because, as a marketer, how can you not fall in love with SEO optimisation, fast page load speed, higher Google rankings, organic traffic growth and even a possibility to create landing pages without involving developers?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And that’s not all.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Below, you will find the most important pros for marketers using Gatsby.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Accessibility </strong>– everyone, especially those with temporary or permanent disabilities, should be able to access websites, tools and technologies, and that’s what web accessibility is all about. WebAIM (Web Accessibility in Mind), a non-profit organization, named Gatsby as the most accessible web framework out there.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Gatsby uses some practices to make its websites as accessible as possible:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Accessible routing – thanks to the accessible routing, it’s possible to use a keyboard to navigate through the website. However, Gatsby offers more than that – for example, you can set up custom page announcements on a page change.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Building HTML pages by default – Gatsby compiles pages using Node.js environment, so you don’t have to worry about progressive enhancement (which means loading core page content before anything else).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Linting using a plugin – Gatsby uses a special package (called eslint-plugin-jsx-a11y) that reduces the time needed to find accessibility errors. This plugin, among other things, also encourages you to add alternative text to all images.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Page metadata</strong> – if you want to have full control over the website’s content and structures, Gatsby gives you that. Having a possibility to add metadata like page titles, meta descriptions and alt texts helps a website rank higher in Google search results. It’s because all of these things help search engines to understand the content on your website and when to display your site in search results.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Use react-helmet components to set metadata for your website, and remember about adding a plugin called Gatsby React Helmet to support server-side rendering (SSR).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Performance and speed</strong> – websites built on Gatsby are like synonyms of speed and performance. Built-in features like static files rendering or progressive image loading are responsible for that. But why is it so crucial? Well, since Google’s update from 2018, site speed became the new ranking factor. In other words, the faster the website is, the higher it will rank in comparison to slower ones. It’s also important from the users’ perspective because they want websites to load fast.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Structured data – </strong>such data helps Google robots to understand the website’s content. Google needs this information to display the most relevant websites in search results. In other words, if you use structured data on your website, it may help you rank higher.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>With Gatsby, it’s easy to add such data – you can use react-helmet, which is embedded in the page head or page body.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Greater user experience</strong> – all of the points mentioned above make Gatsby websites provide a greater user experience. And great UX is not just about performance or speed – it’s about creating made-to-measure experiences that are accessible to everyone, easy to navigate and visually attractive.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Organic traffic growth</strong> – as Gatsby sites are SEO efficient, it consequently leads to higher organic traffic that increases over time.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Possibility to create landing pages </strong>– with a bit of code knowledge, marketers can build landing pages without involving developers.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":5367,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2021/02/Pros-of-Gatsby-for-marketers.png" alt="Pros of Gatsby for marketers" class="wp-image-5367"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><br><br>Pros of Gatsby for developers</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Developers are always looking for new ways to improve their workflow and quality of their work. Demand for modern technologies that help with these two things is growing, and Gatsby is one of the best responses to this demand.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Reasons why developers choose Gatsby:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><strong>Gatsby Cloud</strong> – it’s custom cloud infrastructure for building Gatsby sites that provides four useful things:<ul><li>Incremental Builds – 1000x faster builds.</li><li>Real-time CMS previews – you can preview changes from your CMS in real-time. Therefore, you will make no mistake when publishing content updates.</li><li>Deploy Previews – developers can preview updates in the context of the entire website before merging the code.</li><li>Lighthouse Reports – you can check auto-generated reports on the site’s performance, the best practices, and the accessibility.</li></ul></li><li><strong>Modern workflow</strong> – GatsbyJS follows the latest web standards and technologies including React, GraphQL and Webpack. Therefore, the best features of React and GraphQL are available for<a href="https://pagepro.co/gatsby-development.html" target="_blank" rel="noreferrer noopener"> GatsbyJS developers.</a></li><li><strong>Out-of-the-box performance</strong> – websites and apps built on Gatsby are performant by default, so developers don’t have to install additional plugins or extensions.</li><li><strong>Easy to learn</strong> – especially for those with a good grasp of JavaScript</li><li><strong>Great documentation</strong> – documentation is well structured and easy to use as you can see for yourself on Gatsby's official website. It helps a lot with learning Gatsby and using its full potential.</li><li><strong>Active community</strong> – the popularity of Gatsby is growing, and so is its community. If you have some problem, there is a chance that someone already solved it or will help you with it.</li><li><strong>Access to the Gatsby ecosystem</strong> – plugins, starters, boilerplates and React packages boost the development.</li><li><strong>Great developer experience</strong> – Gatsby gives you an ultimate web building experience because of all things mentioned above.</li><li><strong>Multiple data sources</strong> – Gatsby makes it possible to use any number of different data files locally and pull data from remote sources such as WordPress, Medium, etc. In other words, from any source with available API.</li><li><strong>Very easy for CI/CD</strong> – you can have automatic deployment setup created in 60 seconds on Netlify.</li></ul>
<!-- /wp:list -->

<!-- wp:image {"id":5368,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2021/02/Pros-of-Gatsby-for-developers.png" alt="Pros of Gatsby for developers" class="wp-image-5368"/></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2><br><br>Summary of Gatsby pros</h2>
<!-- /wp:heading -->

<!-- wp:table {"hasFixedLayout":true,"className":"is-style-stripes"} -->
<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><tbody><tr><td><strong>For business owners</strong></td><td><strong>For marketers</strong></td><td><strong>For developers</strong></td></tr><tr><td>Fast page load speed</td><td>Accessibility</td><td>Gatsby Cloud</td></tr><tr><td>SEO efficiency</td><td>Page metadata</td><td>Modern workflow</td></tr><tr><td>More leads and customers</td><td>Performance and speed</td><td>Out-of-the-box performance</td></tr><tr><td>Security</td><td>Structured data</td><td>Easy to learn</td></tr><tr><td>Future-proof</td><td>Greater user experience</td><td>Great documentation</td></tr><tr><td>Low hosting costs</td><td>Organic traffic growth</td><td>Active community</td></tr><tr><td></td><td>Possibility to create landing pages</td><td>Access to Gatsby ecosystem</td></tr><tr><td></td><td></td><td>Great developer experience</td></tr><tr><td></td><td></td><td>Multiple data sources</td></tr><tr><td></td><td></td><td>Very easy for CI/CD</td></tr></tbody></table></figure>
<!-- /wp:table -->

<!-- wp:heading -->
<h2><br><br>Cons of Gatsby</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Gatsby is still evolving, so it’s not surprising that it has some downsides. Therefore, there are some use cases in which Gatsby is not a good choice.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Don’t use Gatsby if:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><strong>There will be a lot of content </strong>– for example, if it’s a large blog, generating a static website can take up to 15 minutes. However, for those using Gatsby Cloud, there is a solution called Incremental Builds which shortens build time up to 1000x, but it’s not free (cost starts from $19/month)</li><li><strong>You need to update content a lot</strong> – because those updates won’t be visible instantly as in, for example, WordPress</li><li><strong>It's a corporate-size webshop</strong> – this point is similar to the first one because the more content you have, the longer the build time will be. Although the solution is Gatsby cloud, first of all, you have to pay for this, and second of all, any updates still won’t be visible right away</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2><br><br>Alternatives: <a href="https://pagepro.co/blog/next-js-vs-gatsby-which-one-to-choose/" target="_blank" rel="noreferrer noopener">Gatsby vs Next.js</a></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Gatsby has its competitor, which is called Next.js and is also based on React. They have a lot in common like speed and performance but also have their differences like best use cases. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can read the comparison between them in <a href="https://pagepro.co/blog/next-js-vs-gatsby-which-one-to-choose/" target="_blank" rel="noreferrer noopener">one of our blog posts</a> or watch our video below:</p>
<!-- /wp:paragraph -->

<!-- wp:embed {"url":"https://youtu.be/jet2J0BOSdA","type":"video","providerNameSlug":"youtube","responsive":true,"className":"wp-embed-aspect-16-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://youtu.be/jet2J0BOSdA
</div></figure>
<!-- /wp:embed -->

<!-- wp:heading -->
<h2><br><br>Further readings</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You may still have many different questions regarding Gatsby, so feel free to read recommended articles or reach out to us directly.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><a href="https://pagepro.co/blog/whats-gatsbyjs-actually/" target="_blank" rel="noreferrer noopener">What is Gatsby, actually?</a></li><li><a href="https://pagepro.co/blog/why-is-gatsby-js-good-for-google-rankings/" target="_blank" rel="noreferrer noopener">Why is Gatsby JS Good for Google Rankings?</a></li><li><a href="https://pagepro.co/blog/pros-and-cons-of-using-gatsby-in-wordpress-projects/" target="_blank" rel="noreferrer noopener">Pros and Cons of Using Gatsby in WordPress Projects</a></li><li><a href="https://pagepro.co/blog/when-not-to-use-gatsbyjs/" target="_blank" rel="noreferrer noopener">When Not To Use GatsbyJS?</a></li><li><a href="https://pagepro.co/blog/is-gatsbyjs-the-best-framework-for-building-static-websites-what-are-the-other-alternatives/" target="_blank" rel="noreferrer noopener">What Are GatsbyJS Alternatives?</a></li></ul>
<!-- /wp:list -->