with Gatsby, React, and GraphQL
Dustin Schau
JavaScript development has never been
We have so. many. tools.
π§
import React from 'react'
export default function Waddup() {
return <h1>It's dat boi</h1>
}
{
repository(owner: "dschau", name: "gatsby-mail") {
stargazers {
totalCount
}
}
}
These are tools developers want to use.
But we can't.
And this sucks.
A lot.
Excellent APIs are ubiqituous.
Software as a Service = π
The de-coupling of the CMS.
(even the CMS is going headless)
The (monolithic) CMS is dead.
Long live the (headless) CMS.
Static Site Generators are so hot right now.
"Markup"
Developers can use the tools they want to use.
- β
React
- β
GraphQL
- β
Node.js
(and hey, less time spent re-implementing those services!)
Build UIs from these disparate, best-of-breed services and tools.
Performance can easily degrade
Complex business logic to combine data sources
Challenging to implement state-management
Separate content and data sources are unified into a single experience.
Use the best tools for the job
Join disparate data sources with GraphQL
Serve optimized static assets
Get a blazing fast experience doing so
(We say this... a lot. But it's true!)
(I told you we'd come back to this)
Node APIs to load any data source into GraphQL
Inject dynamic data at build time
Static... as much as possible!
Perf. Acronyms
H/2PRPLRAILFLIPSPASWTTIFMPFCPTTFPPWATTFB
How many do you actually know?
Deploy your content... wherever.
(on the edge or the server in your basement)
Neat.
Gatsby's just a static site generator though, right?
π
ββοΈ π
ββοΈ π
ββοΈ π
ββοΈ π
ββοΈ
static assets !== static app
A Gatsby site is a React application
(not a real product; just for funsies)