This project shows how to create a simple React app with Melange and ReasonReact.
The app just renders a component with "Hello world".
To set up the environment to work with it, you will need to install opam and Node.js.
$ cd example/3-vite
$ make init
$ make dev
Then open the browser to see the rendered app.
You can see all available commands by running make help
or just make
. Here
are a few of the most useful ones:
make init
: set up opam local switch and download OCaml, Melange and JavaScript dependenciesmake install
: install OCaml, Melange and JavaScript dependenciesmake watch
: watch for the filesystem and have Melange rebuild on every changemake dev
: Run the application locally with vite and melange simultaneouslymake bundle
: creates a full bundle with the generatedjs
files andhtml
page