Chapter 10: Building Gatsby Components
This chapter introduces the M component of the Jamstack; that is, Markup. Markup is most often used to render, or produce, the content that the end user will view in the browser, decorated with some formatting. Code modularity in Gatsby is achieved through the use of components, which are its building blocks. Each component building block that is built using JavaScript and JSX will accept input and return HTML and web content to the browser. In this chapter, we will learn how to create, edit, and extend these components – the building blocks of the site.
Components exist in several forms, so we will also look at how they can produce single pages, exist as page templates, and finally how page partials are structured and how the three differ from one another.
The main topics that we will cover in this chapter are the following:
- React components
- Understanding the types of components