gatsby-starter-mobx
gatsby-starter-mobx copied to clipboard
Gatsby starter with MobX and TypeScript
Gatsby MobX starter
Gatsby + MobX + TypeScript starter.
Why? Because Gatsby is excellent also for React apps (not just static sites) and I wanted to have a quick alternative to create-react-app --typescript with a couple of things configured.
Features
- Gatsby v2 + TypeScript
- MobX with decorators
- Two examples based on @mweststrate's Egghead course:
- "Counter" as a basic store and an observer
- "Temperature" as a demo of
<Provider>and type-safeinject
.editorconfig& Prettier- TSLint
- Jest setup
Usage
- Make sure you're in a Linux-y shell (on Windows, use e.g. Git Bash or MSYS2;
rm -rfand similar might be called from npm scripts). yarnyarn start
Other notable scripts (see package.json):
yarn build- (You can verify the statically generated site with e.g.
npx local-web-server -d public.)
- (You can verify the statically generated site with e.g.
yarn tscyarn lintyarn prettieryarn testoryarn test --watch