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 …

Why to use higher-order components anyway?

This is the final post from the post series about higher-order components. In the previous posts, we’ve uncovered the ideas behind the concept of higher-order components. We’ve also learned how to create a higher-order component and how to compose several of them together and enhance a presentational component by them. As …