Functional programming to the rescue!

+

marcelocamargo@linuxmail.org

/haskellcamargo

TREE oF CONTENTS

What is Reason?

Why a new language?

React for Reason

Javascript interoperability

What about the future?

what
is
reason?

a new syntax for ocaml and a new toolchain

made for web development

Reason compiles to ocaml

then ocaml compiles to js

why
a new
language?

Because javascript has some issues...

but it still has common semantics with ocaml

ocaml is safe

and catches bugs before they happen

reason

has...

Cool error messages!

type safety and inference

REACT
For
reason

yarn global add bs-platform
bsb -init counter -theme react

src/App.re

src/Page.re

Typed state

src/Page.re

Typed actions

src/Page.re

Component definition

src/Page.re

Reducer

src/Page.re

Style it!

javascript
interoperability

what
about
the future?

thanks for your

ATTENTION

/facebook/reason

React + Reason (Pagar.me)

By Marcelo Camargo

React + Reason (Pagar.me)

  • 1,460