Introduction to Reason language with React using ReasonReact. I talk this in Roppongi.js #1.
©2018 Wantedly, Inc.React with ReasonRoppongi.js #120.Mar.2018 - Yuki Yamada
View Slide
©2018 Wantedly, Inc.Yuki Yamada@yamadayukiI’m an Engineer @ WantedlyI write JS, Golang, Ruby … etc.Now I focus on Machine Learning.
©2018 Wantedly, Inc.What is Reason / BuckleScript ?
©2018 Wantedly, Inc.Reasonhttps://reasonml.github.ioReason have BuckleScript/OCamlbackend. It gives OCaml a familiar syntaxgeared toward JavaScript programmers.Powerful, safe type inference means yourarely have to annotate types, buteverything gets checked for you.
©2018 Wantedly, Inc.BuckleScripthttps://bucklescript.github.ioBuckleScript makes OCaml compile toclean, readable and performantJavaScript code.- Sound type system- Strong type inference- Expressive type features
©2018 Wantedly, Inc.ReasonReact
©2018 Wantedly, Inc.ReasonReactWhy & WhatReasonReact is safer and simplerthan the React Applicationimplemented with vanilla JavaScript.And you can easily integrate withbenefit from OCaml syntax and itsfunctionality such as Variants andpattern matching.
©2018 Wantedly, Inc.ReasonReact SampleSimple Button component
©2018 Wantedly, Inc.ReasonReact SampleButton component (Solid / Ghost / Transparent)
©2018 Wantedly, Inc.ReasonReactState, Action and ReducerReasonReact stateful componentsare like ReactJS statefulcomponents, except with theconcept of "reducer" (like Redux)built in.
©2018 Wantedly, Inc.ReasonReactRouterReasonReact has tiny router functionsto use with ReasonReact.- The simplest, thinnest possible- Easily pluggable anywhere intoyour existing code- Performant and tiny
©2018 Wantedly, Inc.Enjoy