Wheeler argues that building complex applications in JavaScript can feel unreasonable, and introduces Reason as a typed syntax and toolchain for OCaml that feels familiar to JavaScript developers. He highlights static types, type inference, native compilation, and the ability to adopt Reason incrementally alongside existing JavaScript.
Reasonable React Native
Speaker
Ken Wheeler, director of open source at Seattle-based consultancy Formidable, explains Reason and ReasonReact for building React Native apps at a Callstack event.
Wheeler walks through familiar primitives, block-scoped let bindings, and Reason’s module system, where each file acts as a module and names are accessed with dot notation. He also covers function shorthand, labeled arguments, records, variants, and pattern matching, including variants for idle, loading, and error states.
BuckleScript compiles Reason and OCaml to readable JavaScript and provides interop through typed external declarations. Wheeler then explains ReasonReact components, props, text conversion, and state updates, which use updater functions returning a new state or a no-update result.
Wheeler recommends the community’s BSReactNative bindings so developers can use pre-typed React Native APIs. The bindings represent many style values as language-level enums, enabling completion and rejecting unsupported values such as an invalid style property.
Wheeler describes building the Seattle JS conference React Native app in Reason over two weeks and says it included a modal animation that opened from an item’s position. He outlines setup with a React Native app, bs-platform, bs-react-native, reason-react, a BuckleScript config, and build and watch scripts; the JavaScript app entry point imports the compiled Reason component.
Takeaways
- Reason can be introduced incrementally into JavaScript projects, according to Wheeler.
- Variants and pattern matching can make loading, idle, and error states explicit.
- Typed React Native bindings can catch invalid style values while coding.
- A ReasonReact project needs a JavaScript entry point that connects to the compiled Reason component.
- Wheeler’s conference app shows one developer using Reason for a nontrivial React Native project.
Mentioned in this talk
Search inside this talk
What was claimed 9
- role atKen Wheeler is director of open source at Formidable
“I'm the director of open source at a company called Formidable.”
YouTube Unverified1 source· Talk
- uses
“It's a new syntax and toolchain for OCaml.”
YouTube Verified2 sources· Talk
- feature
Reason: Static types and type inference
“One of its stronger points is static types and type inference.”
YouTube Unverified1 source· Talk
- usesBuckleScript uses JavaScript
“They compile Reason and OCaml to JavaScript.”
YouTube Unverified1 source· Talk
- integrates withBSReactNative integrates with React Native
“If you want to do React Native with Reason, it's pretty similar, but you need to use the actual bindings for React Native.”
YouTube Unverified1 source· Talk
- launchedReact Native Enterprise Framework: App Store release
“I put the first Reason ML React Native app in the App Store.”
YouTube Unverified1 source· Talk
- built
“I was like, 'We don't have a app. Really? Okay, I'll make an app.'”
YouTube Unverified1 source· Talk
- uses
“I decided I wanted to do it in Reason.”
YouTube Unverified1 source· Talk
- uses
“Here's the Seattle JS conference app. It's an RN app.”
YouTube Unverified1 source· Talk






