My React Hook Notes

8th August 2019

I have been doing a lot of reading on React Hook, there's quite the hype for it. The more I read, the more I understood why. It will breakdown existing complex app logic into simpler, flatter architecture. There were some key points I wrote down as part of my reading, which I think will be very helpful later to refresh my memories and decided to upload it on here for others to see as well. It is a digested version of the reading materials I listed in the source section below.

Write clean React code: starting with JSX

21st June 2019

React is arguably the most popular JavaScript rending library/framework right now. With its rising popularity and now dominating the job market, many similar JavaScript rendering libraries followed suit and adopted JSX into their work. In case you are new to frontend development, JSX is a JavaScript Syntax introduced as part of React (open sourced by Facebook back in 2015). Now you can find JSX in not only projects that are meant to be similar to React (e.g. Preact) but also things like Nerv, infernojs, Deku, and etc.

Ways to improve list loading performance

10th June 2019

As developers lists are one of the main things we work with, for no other reason than it is such a powerful data visualisation technique. We use it so much that it is second nature to dump a list of data on the screen. This is fine for users with good hardware devices and fast internet connection. But what about when we don't have the ideal scenario? In this article, we'll talk about some nice techniques we can use to improve user experience with lists on low-end devices or slow internet connection.

Volunteer to teach people to code

8th May 2019

I volunteered a couple of weeks back and offered to teach whoever is interested to learn to code. It takes place in my local library, which fortunately for me, is very close to both where I live and work. Today, I just had my first session. This is the first time I'm doing something like this, though I'd share my experience and learnings. In case anyone is thinking of doing something similar.

How to set up Site Preview with Contentful, Gatsby and Netlify

1st May 2019

It has been a while since I wanted to get preview working for my blog. There is a lot of custom styling on my blog site, and often things don't look quite right when I publish an article for the first time. This often means it will take a few republishes before getting everything nailed. If someone were to visit my site during this stage, it wouldn't have been good user experience. So I was always curious about the Preview function on Contentful. Last night, I decided to take a stab at it after seeing this contentful doc. It looked easy enough, but as always, I encountered some issues. After getting everything working, I thought I'd share my solution on here, maybe it'll help someone else out.

Docker Cheat sheet

26th April 2019

It seems like everyone has their own Docker Cheatsheet nowadays, and I thought I'd add one more into the mix. I've noted down some handy commands I use most often when I work on Docker-related tasks.

Create personal email address with custom domain

22nd April 2019

Since Oct 2018, roughly 6 months ago, I have decided to utilise my own custom domain and create my own personal email address with this domain. In my mind, it was always going to be some complex process, and have been avoiding it until now. But recently, I found an easy way to do this and thought I'd share it on here.

Two practical Webpack performance optimisation

9th April 2019

If you have seen my previous blog on Parcel bundler then you'd know my thoughts on Webpack. It is big, complicated and slow. It's big and complex because there are a lot of plugins for it and many ways to set it up as well as customising it. It is slow often due to the enterprise applications it is used in, simply because there are a lot of things going on in these projects than someone's SPA (single page application) personal project. Nobody wants to wait more than 1 min for the build process, here I'll be talking about a couple of practical hacks to boost the Webpack build performance used in a recent project.