Solutions Architect | FullStack Developer

CONNECT

Why use Gatsby? 6 Reasons why you should consider it in your next project

Gatsby

Gatsby is Static Site Generator tool for React, which means it will generate a static site (only HTML/CSS/JS) from your source code. As everything is already built, gatsby sites are very, very fast. After some time, it became my favorite tool for building sites.

Following are six reasons why I use Gatsby and I think you should use too.

#1 It's insanely fast

Gatsby generated sites are amazingly fast. As it generates only HTML, CSS and Javascript files, the resulting site is quickly served, and any web hosting can handle it. It also makes your site very easy to scale.

#2 It is very well documented

Go to https://www.gatsbyjs.org/docs/ and be overwhelmed with so much information. There are docs for experienced users and for novice, detailed documentation of its components, tools and concepts, and recipes for common tasks like linking pages or adding images.

There is also a very good tutorial that guides you from setting up your development environment to prepare your site to go live.

#3 Easy to use

Gatsby tools facilitate web site development. Its command-line interface (CLI) is simple and intuitive, allowing you to:

  • start a new site using a "starter"

    gatsby new <site>
    
  • start the development server (with hot reloading!)

    gatsby develop
    
  • create a production build

    gatsby build
    
  • Start a server to test the production build

    gatsby serve
    

    Another great tool is the GraphiQL, a visual tool to build and run GraphQL queries, available when the development server is up.

#4 Plugins, Starters and Themes!

Gatsby has a great ecosystem with lots of plugins, starters and themes available.

Plugins

Plugins extend Gatsby functionality making it easy to add new features to your site. They can: source content, transform data, add offline functionality etc. There are a lot of plugins in its Plugins Library.

Starters

Starters are preconfigured sites to help you start your own site. Do you want to make a blog with Gatsby? There is a starter for that. Maybe a single page application? There is a starter for that too. Hundreds of starters are available in the Starter Library.

Themes

Finally, themes are sites packaged so anyone can use. It is like starters, but ready to use. You can create a new site using a theme instead of a starter or you can add the theme in an existing site as an npm package. Checkout the available themes here.

#5 Based on React

Gatsby is made for React sites and apps, so you have access to all your beloved react packages, and you can develop your website quickly with all its facilities, like declarative, component-based development.

#6 PWA and SEO out of the box

Progressive Web Applications are web apps that can also be used as mobile apps. To achieve this, the site must:

  • have a standard manifest
  • have a mechanism to work offline (Service Worker)
  • running under HTTPS

The first two points are easily achievable with Gatsby plugins, for the last one you will need a certificate installed in your hosting provider.

SEO is also very easy with Gatsby: as the generated site is all HTML, everything is reachable to search engines. There are also plugins to set metadata information like site name, description and author.

Conclusion

If you will start the development of a new site, there are a lot of reasons to consider using Gatsby: it provides a rapid development environment, it is very well documented and the final product will have a great performance.