bobzhang / rescript-react-demo

A demo to show ReScript with React under 1K

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A demo to show ReScript with React under 1K

Simplicity is the virtue

  • There are only 3 directories under node_modules, the compiler, the bundler and @rescript/react, no node_modules black hole.

  • The bundled output is tiny. It is self-contained, we treat the well established libraries: React and ReactDOM as a blackbox using import maps shipped with chrome 89

  • Set up an http server, you should see an output as below

image

  • It scales. The ReScript build system can handle more than 10K files in a repo around 1~200ms.

Build

npx bsb -make-world && node ./bundle.js

About

A demo to show ReScript with React under 1K


Languages

Language:JavaScript 49.2%Language:ReScript 32.6%Language:HTML 18.2%