rescript-react-boilerplate
rescript-react-boilerplate copied to clipboard
An opinionated app shell for ReScript & React progressive web apps
Rescript React Boilerplate
An opinionated implementation of the following technologies:
- ReScript & React
- Simple routing using ReScript's built in router
- Quick and dirty route transitions via ReactTransitionGroup
- Choose between Emotion, Sass or styled-ppx for styling
- http-server for a quick and easy development server
- esbuild for fast bundling
- Automatically generated ServiceWorker for rich offline experiences (here's a great in-depth course on the topic)
CSS Flavors
Getting Started
npm install
npm start
open http://localhost:8081
Demo
Tutorial
(Video overview coming soon)
Development Environment
Since we're using ReScript and esbuild, our build times are fast.
Because of this, we use chokidar (a cross-platform file watcher) to watch for changes and then rebuild the dist
directory on every change. The dist
directory is the same whether in development or in production.
The build should work on macOS, Windows & Linux.