Rescript React Starter Kit

screenshot of Rescript React Starter Kit
express
react

An opinionated starter kit for ReScript React

Overview

The ReScript React Starter Kit is an opinionated starter kit for developing applications using ReScript and React. It provides a familiar standard library, ready-to-go request handling, a development server, a testing library, styling with Emotion, routing capabilities, and the ability to manage titles and metadata. The kit also includes a set of commands for starting the compiler, development server, building the project, bundling, and running the test suite.

Features

  • Familiar standard library: The kit provides a configuration that automatically includes the Belt and ReScriptJs.Js libraries, allowing for easy manipulation of ReScript-specific types while defaulting to JavaScript APIs when available.
  • Ready-to-go requests: Three building blocks, including AsyncData, Future, and Request, are provided to handle API calls easily and manage asynchronous data in React component state.
  • Dev server: The development server waits for the BuckleScript compiler to be ready before triggering a compilation, reducing waiting times during project development.
  • Testing library: ReScriptTest is included, providing a light testing framework that integrates well with React and allows for mocking HTTP call responses. The library takes care of running and rendering the tests, while the assertion part is left to the user.
  • Styling with Emotion: The kit includes zero-cost bindings to Emotion, allowing for CSS-in-ReScript styling right out of the box.
  • Routing: A routing system is provided, with the ability to manage routes using the Router and <Link /> modules. By setting the PUBLIC_PATH environment variable, the boilerplate takes care of the rest.
  • Titles & metadata: The kit provides a way to set titles and metadata for each route using the <Head /> component, which binds to react-helmet.
express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.