A starter for building universal web apps with ReasonReact.
Far from refined. Used as a basis to learn ReasonML and POC for server side rendering with ReasonReact
- ReasonReact
- SSR - Server side rendering
- Webpack
- HMR - Hot Module Reloading
- PWA - Progressive Web Applications
- React Router v4 bindings
- React Helmet bindings
- React Fela bindings (bs-react-fela) plus custom bindings that adds server rendered styles and the ability to use plugins
- ReactGA bindings
- Use install dependencies:
yarn
- For dev mode with hmr run
yarn dev
ornpm run dev
, open browser, the app should be running at: http://localhost:8080. (If you get errors in terminal runbsb -make-world
) - To build run:
yarn build
ornpm run build
- To build and run use:
yarn build
ornpm run build
followed byyarn start
ornpm start
TODO
- Better HMR
- Optimized Webpack builds
- Graphql client - Reason-Apollo or ReGql until official Apollo Client and React Apollo binding are released
- Code splitting - Not sure how to accomplish this yet.
- Explore binding to another router universal-router?
- Use Javascript for express server - bs-express is missing a few things or just use razzle.