Create a Data Directory in Gatsby using the onPreBootstrap lifecycle
lessonDuration 2m 13s
Learn how to architect the React components in your Gatsby theme to maximize reusability and extendability while minimizing maintenance and hassle. The first step is to make sure the `data` directory exists so because `gatsby-source-filesystem` will throw an error if it doesn't. This lesson will cover that step. For a written version of this course, check out the [Gatsby docs](https://www.gatsbyjs.org/tutorial/building-a-theme/).