DEV Community

Discussion on: Creating a Custom React Hook for Gatsby Site Metadata

Collapse
 
tvanantwerp profile image
Tom VanAntwerp

Love this!

I really hated the way StaticQuery was typically written--it was a real turn-off for using Gatsby. I've much preferred the useStaticQuery hook, and I really like making a custom hook for site metadata! (Gatsby's queries are sooooo verbose...)

Collapse
 
spences10 profile image
Scott Spence

Thanks @tvanantwerp ♥️

I really quite liked the render props pattern for not so deeply nested components.

When using it for things like Apollo it does get quite hairy!🙃