Organize React Components in a Gatsby Project

InstructorTaylor Bell

Share this video with your friends

Send Tweet

Clean, well-organized code is good for everyone. In this lesson we will extract the Header component out of the main page layout and into its own file in a new components directory.

~ 6 years ago

I think it would be a lot better to just pass title and description props to the TitleAndDescription component instead of the whole data object.

Ender Akay
~ 5 years ago

import { StaticQuery, graphql } from 'gatsby' is not needed in the index.js