Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.04 KB

README.md

File metadata and controls

37 lines (26 loc) · 1.04 KB

2-react


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.

Get started

$ cd example/2-react
$ make init
$ make watch
# in another tab
$ make serve

Then open the browser to see the rendered app.

Commands

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 dependencies
  • make install: install OCaml, Melange and JavaScript dependencies
  • make watch: watch for the filesystem and have Melange rebuild on every change
  • make serve: serve the application with a local HTTP server
  • make bundle: creates a full bundle with the generated js files and html page