In this blog post, I share my recent experience in a UI project, as a developer with limited past experience in UI development. I published this internally on REA Group’s wiki a while back to foster interest in UI projects from a broader set of developers – highlighting that solid engineering is a big part of contemporary UI development.
This is not specific to REA, hence I was keen to share this journey externally on our blog. Continue reading
In this blog post, I'm going to provide a very simple explanation for Applicatives (aka "Applicative Functors") just the way I know them. I'm not going to cover the math behind it, or the laws which applicatives must obey.
I've taken a reverse approach compared to many other posts explaining Applicatives: rather than starting with what Applicatives are, I'm going to start with some examples to demonstrate the need for them, then I'll show how Applicatives can be used and at the end, I'll briefly cover how they can be implemented. Continue reading
A Little Bit of Background
During this project, we came across a few different use cases for some cross-cutting concerns, such as page load tracking, toggling new features on and off, and desktop/mobile toggling. We wanted to implement these in a generic and reusable way to avoid code duplication. For example, we had different pages (routes) in our application, and wanted to track user visits to those pages, but didn't want to duplicate this tracking code for every route.
We initially used React mixins for some of these problem, but ended up replacing it with higher-order components. In this blog post, I'll first provide a brief introduction to higher-order components (HOCs), and will then go through our journey for each use case and will explain each of the aforementioned techniques (mixins and higher-order component) in more details.