We’re excited to announce that today we shipped the first beta for Gatsby v2! 36 contributors have made over 300 commits to v2 since Gatsby v1 was released in July 2017.
What’s coming in v2?
Gatsby v2 builds on the foundations of v1 to introduce a range of improvements:
Out With Gatsby Layout Components, In With StaticQuery
Gatby’s special layout components were a common source of confusion in v1. After an RFC and informative community discussion, we decided to remove them and create
StaticQuerywhich allows GraphQL queries to be added to any component. For more information on migrating your layouts, check out our Life After Layouts post.
actions, as well as other changes intended to make API names more consistent and prevent common gotchas.
Hotter Hot Reloading
Previously, hot reloading of code and data had been dependent on new webpack builds. On larger sites, that could take ten or fifteen seconds — more like lukewarm reloading, really. With ludicrous mode we’ve decoupled data updates from webpack so changes you make to your content show up on your site at blistering speeds.
Key upgrades include:
Can I upgrade now to v2?
Yes! We’ve built gatsbyjs.com with v2 and the Gatsby community is converting over the example sites. While the effort to migrate individual sites may vary, we’ve noticed significant build speedups in Gatsby v2 versus v1 and would love you to dig in and try it. We’re working hard on refining Gatsby v2 for full release and would love your help!
What’s coming next?
The v2 roadmap details everything else we’re planning for v2. Improvements include:
- Additional build optimisations
- Better error messaging
- PostCSS configuration updates
Finally a big thank you to all of Gatsby’s contributors for their time and effort on every version of Gatsby. Special thanks in particular to everyone who’s helped with v2 so far: @ajayns @brizzoli @calcsam @CanRau @chmac @danielfarrell @davidluhr @daydream05 @dennari @Drew-Slagter @dvonlehman @flipactual @hsribei @jlengstorf @jquense @Khaledgarbaya @kkemple @kripod @KyleAMathews @LeKoArts @lettertwo @m-allanson @mathieudutour @mottox2 @mquandalle @nihgwu @noelebrun @pieh @piotrkwiecinski @resir014 @ryanditjia @syndia @ThatOtherPerson @thebigredgeek @thescientist13 @tsriram