I know Reactjs, why do I need Gatsbyjs?

I know Reactjs, why do I need Gatsbyjs?

Target audience

This article is aimed at people who have done the basics of Reactjs or React for short and are contemplating learning Gatsbyjs or Gatsby for short. If you've never taken any course or don't know React yet you are advised to learn the basics of React before walking your way up to Gatsby or continue reading to get a pre-knowledge of what Gatsby entails.

What is GatsbyJS?

According to the Documentation site, Gatsby is a React-based open-source framework for creating websites and apps. Gatsby is also known to be a popular static site generator, so knowing React is fuel to your jetpack for creating dynamic-static sites

Features of GatsbyJs

why is Gatsby special from other static site generators?

  • It can be used to build sites Progressive Web Apps

  • It makes use of the latest and industry demanded technology including modern ES6+ JavaScript, CSS, ReactJs, Webpack, GraphQL.

  • It has a large collection of plugins (with over 2000) built by a large community of developers, you almost never have to reinvent the wheel to solve certain tasks.

  • It is open-sourced. So peradventure there is no such plugin to solve your task, you can contribute such plugins to gatsby (sleek right?).

  • Gatsby is also special in the way it leverages mainly GraphQL for its data-layer meaning Gatsby can collect your data from wherever it may be

    • JSON

    • Third-party API

    • Markdown files

    • CMS such as WordPress

    • etc.

It does this at build time to enhance load speed, it creates an internal GraphQL server of all of the data. All of your data is queried at build time in your react components.

  • Gatsby has wonderful documentation and starter files that will get you up to speed even as a beginner. GraphQL data collection sounds intimidating, but Gatsby has good documentation of data source plugins, a simple few lines of code in the config file will do the job.

Pros and Cons of Gatsbyjs

Pros

  1. Sites built with Gatsby have Remarkable speed
  2. Numerous plugins available to choose from to ease your task
  3. Multiple starter template is also available if you choose not to build from scratch
  4. It is based on React a very popular JavaScript framework, so you tend to adjust easily coming from a react background.
  5. Ease of use from multiple data source which includes markdown, JSON, third party API
  6. It is open-sourced

Cons

  1. It takes much time to build sites with lots of content

If you like the article, please endeavor to share it with others.