Learn Reason by building Tic Tac Toe in React (part II)

In the first part, we initialized our Tic Tac Toe game, tackled some of Reason’s basics and defined our variant types. We’ll continue where we left off—that is, in the render method of the Board component. Since we are dealing with lists there, we’ll talk about them a little bit …

Learn Reason by building Tic Tac Toe in React (part I)

You may have heard of Reason before. It’s a syntax on top of OCaml that compiles to both readable JavaScript code and to native and bytecode as well. This means you could potentially write a single application using Reason syntax, and be able to run it in the browser, and …

Why am I building stuff in ReasonML and why should you?

It’s mainly because of these built-in features: BucklesScript, JavaScript interop, functional programming, and type system, Reason formatter. Let’s talk about them some more! BuckleScript One of Reason’s powerful features is BuckleScript compiler, which takes your Reason code and compiles it to readable, and performant JavaScript with great dead code elimination. …

Higher-order components: the ultimate guide (part II)

In the first part of this series, you learned how to write reusable higher-order components and hopefully understood the ideas behind this pattern as well. Now, you are going to learn the difference between class HoC and the functional one and we’ll spend a good amount of time understanding how the …

Higher-order components: the ultimate guide (part I)

The maintainable component structure is a crucial prerequisite for a stable React application. You can achieve this by writing your code in a functional way using higher-order components (HoCs). If you stick to this pattern, you’ll end up with reusable components that are both readable and easy to test as …