Updated: 11 November 2023
https://www.gatsbyjs.com/docs/tutorial/getting-started
- A page (React) Component contains all the UI elements for a specific page of a site.
- Gatsby automatically creates pages for React components that are the default export of files in the src/pages directory.
- A Gatsby plugin adds additional features to a Gatsby site. It is a standalone npm package.
- Gatsby plugin library https://www.gatsbyjs.com/plugins
Data Layer
- Source plugins pull data from their original location into the Gatsby GraphQL data layer.
- Use the GraphiQL endpoint (localhost:8000/___graphql) to explore data in the data layer and design GraphQL queries.
- Write GraphQL queries to pull data out of the data layer and into React components.
- To pull data into a “building block” component, use the
useStaticQuery
hook. - To pull data into a page component, use a page query.