Gatsby - A Static Site Generator

3 min read

In today’s article, I’m hoping to give you guys a quick overview of the React-based framework, GatsbyJS. By the end of this article, you will know what Gatsby is, where you can use it, what makes Gatsby unique compared to other Static Site Generators (SSGs), what you need to know to build a site with Gatsby and whether you should use Gatsby for your projects

The Great Gatsby

What is GatsbyJS?

GatsbyJS is an open-source framework based on one of the most popular frontend library, React, that utilizes the functionality of the query language, GraphQL and the JavaScript module bundler, Webpack to provide a single tool to build performant static websites or apps. Although Gatsby is an ‘SSG’ (Static Site Generator), it is more like a modern-frontend ‘super’ framework, since it combines the best of ReactJS, GraphQL and Webpack.

Fact - This blog is built with Gatsby.

Where can you use Gatsby?

The main purpose of GatsbyJS is used to build static sites. Here some use cases for Gatsby:

  • Portfolio Website
  • Landing Pages
  • Blogs
  • eCommerce Website
  • or any other website that uses less dynamic actions

Check out the Use Cases page on the Gatsby Website for more.

What makes GatsbyJS unique compared to other SSGs?

One of the main reason as to why it’s unique, according to me is the fact that Gatsby is built on top of the already popular and loved library, React. This implies, that if you can build something in React, it’s most likely that you can build it with Gatsby too, maybe even better. Apart from this, there are many other noteworthy features that Gatsby brings to the table. Some of which are:

  • Performance

  • Scalability

  • Security

  • SEO Optimization

  • Developer Experience

  • Exclusive open-source Ecosystem

  • World-Class Documentation

Check out Gatsby’s Official site for more features or this post that goes in detail.

Do you need to be good at React, GraphQL and Webpack?

The answer to this question is Yes and No🤔. See, like I mentioned above, Gatsby is built with React), GraphQLand Webpack, so if you are a developer who knows or has worked with at least one of the three technologies, it’s going to be easier to learn it than you might think. It’ll be even more easier if you knew at least React since the majority of Gatsby is based on React.

At the time I heard about Gatsby and had the interest to learn it, I knew only React (and Python, but that’s completely irrelevant)😁, it wasn’t that much of a steep learning curve for me to learn Gatsby. I already knew React and a tiny bit of Webpack, so I only had to learn GraphQL properly. I didn’t quite ‘learn GraphQL’, instead I started with a Gatsby starter template, ran the website and whenever I wanted to implement something new with GraphQL or understand why a certain query from that starter template was necessary, I would just google it or scour through the official documentation to find an answer. I built two or three types of websites with Gatsby with this method and after that now I can say that I know GraphQL to some extent. Don’t get me wrong, I am no expert at GraphQL yet, or saying that you can learn GraphQL as I did, but I’m not saying that you cannot do it either.

On the other hand, if you are a person who already knows all three of these technologies, then you’ve got nothing much to learn, you already know Gatsby.

You already know Gatbsy

Should you use Gatsby for your next web project?

Well it depends on the type of project you want to use it, Gatsby is a powerful framework with a lot of advantages, but it also might have some downsides depending on the use case. For me though, It was a great investment for me to learn it, as I was able to build this entire blog from scratch all by myself. Since I use Netlify to host this site, the workflow is extremely simplified. Whenever I make a change and push the changes, Netlify automatically rebuilds it and redeploys it, saving me a lot of my time. So I’d recommend you take a look at the framework, and like I said, if you a developer coming from a React background, learning Gatsby might add some more value to your resume, or it can be just a flex 💪😊.

This has been my thoughts on the Gatsby framework, if have something to say about it, shoot me a tweet @itsammaar_7. In the future I’m hoping to write tutorials on building Gatsby sites, so stay tuned for that.

About The Author

Author Image

Hi👋, I’m Ammaar Aslam. I’m a passionate, self taught programmer from Sri Lanka. I'm the founder and author of Code Circuit. I built this blog to share my programming journey and help others along the way.

You can follow me on Twitter, Instagram and Github

Related Articles

This website uses cookies to personalize content and analyze our traffic.Learn More

Accept