Update to Gatsby v2.1.0 which introduces useStaticQuery, a new Gatsby feature that provides the ability to use a React Hook to query with GraphQL at build time. It provides the same functionality like the StaticQuery component, but as a Hook rather than a component that takes a render prop.
Update to Gatsby v2.1.0 which introduces
useStaticQuery
, a new Gatsby feature that provides the ability to use a React Hook to query with GraphQL at build time. It provides the same functionality like theStaticQuery
component, but as a Hook rather than a component that takes a render prop.