Skip to content

Latest commit

 

History

History

2-react

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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