Quick StartTryGuideAPICommunityBlogGitHub

Reason is a new syntax and toolchain for OCaml, a powerful language that will give you type-safe, maintainable code that transforms into performant, readable JavaScript.

Get startedLearn more

Types without hassle

Powerful type inference means you rarely have to annotate types, but everything gets checked for you.
See how

Online playground

Play with Reason in-browser, take a look at the produced OCaml and JavaScript, and try out code samples.
Try it now

Easy JavaScript interop

Use packages from npm with minimum hassle, or drop in a snippet of raw JavaScript while you're learning
Learn more

Flexible & Fun

Make websites, animations, games, servers, cli tools, and more! Take a look at these examples to get inspired.
See examples

JavaScript quickstart

npm install -g bs-platform
bsb -init my-first-app -theme basic-reason

And then run it as usual:

cd my-first-app
npm run build

You can also build in watch mode:

npm run watch

This will compile Reason to Javascript in the lib/js/ folder

Alternatively, to start a ReasonReact app, try bsb -init my-react-app -theme react. More info on bsb & bsconfig here. BuckleScript has first-class support for Reason, which is why you don't see any extra "reason" installation.

Examples

Reason MazeMareo: Mario + ReasonReasonReact Hacker NewsReason snake