Universal front-end React + GraphQL starter kit, written in Typescript.
Features
Front-end stack
- React v16.8 (the one with hooks!) for UI.
- Apollo Client 2.5 (React) for connecting to GraphQL.
- MobX-React-Lite for declarative, type-safe flux/store state management.
-
Emotion CSS-in-JS, with inline
<style>
tag generation that contains only the CSS that needs to be rendered. -
Sass, Less and PostCSS when importing
.css/.scss/.less
files. - React Router 4 for declarative browser + server routes.
-
GraphQL Code Generator v1.1 for parsing remote GraphQL server schemas, for automatically building fully-typed Apollo React HOCs instead of writing
<Query>
/<Mutation>
queries manually - Declarative/dynamic
<head>
section, using react-helmet.
Server-side rendering
- Built-in Koa 2 web server, with async/await routing.
- Full route-aware server-side rendering (SSR) of initial HTML.
- Universal building - both browser + Node.js web server compile down to static files, for fast server re-spawning.
- Per-request GraphQL store. Store state is dehydrated via SSR, and…