The source code for this blog is available on GitHub.


by Hao Jiang

How to Build a Mini React: From JSX Element to useState

"What I cannot create, I do not understand." - Richard Feynman

Web Worker & Service Worker Explained

Websites are by default fragile and brittle, as they are always failing because of slow connections, server downtime and simply going offline. However, service workers might be a good way to help the web have an intuitive and empathetic experience for the user.

React Performance Recipes

Performance optimization can be daunting, but there are still more solutions than problems. In this post, I talked about how to tackle common performance issues when developing with React. Get a solution for every React performance problem you might encounter.

How to Build a Mini IO Monad

Instinctively, when we look at a difficult concept for the first time, that ONE question that pops into our minds is usually "what is it". Because asking "what" is such a valuable human nature that helps us protect ourselves from our natural enemy in the old days. And it can be effective if we already know what we could be dealing with. Lions, tigers, or cute puppies. But if this unfamiliar concept is deeper than you thought it would be, you'd better switch your tactics and asking "how does it work", more close to our instincts, "what can it do" or "what can it be used for". By asking the right question, we can just discover the concept ourselves.

How to Build a Mini Functor

Functors and monads. Both of them are useful and important design patterns in functional programming. More importantly, you can't understand monads without functors. So in this post, let's talk about functors. let's start with the definition of a functor.

FP in Plain English: How Composition & Currying Work

Functional programming is a cool programming style with a lot of neat benefits, but it's also poorly explained and rarely understood. It's mainly because of the lack of intuition in math language. People can't understand you if you sound alien. In this series of posts, I'm going to shortly explain to you some FP concepts in plain and simple, day-to-day English. Hope you find this helpful.

How Closures Work

Closures are not easy to grasp, but it ain’t impossible. We, as learners, have to understand that, 99% of the time, a concept is always built upon others. We have to figure out how all those dots are connected. Who’s first, who’s next. It’s usually a good approach to trace what you don’t understand in reverse. Start with the definition, break it, and repeat it on every small part. And here, we are gonna do this on closures.