Technical Blog

Written by Chak Shun Yu, a software engineer with a current focus on frontend and React, located in the Netherlands. This blog is where I write about everything I encounter and learn during my journey to become a better developer. You can also follow me on Twitter and Dev.

A Beginners Guide To Behaviour Testing In React

December 02, 2021

Although behaviour testing is extremely relevant in the field of React, not every developer will have equal familiarity and mastery of it. This article discusses a set of fundamental questions related to behaviour testing in React based on experience in multiple React engineering teams.

How To Prevent Unnecessary React State Update Re-renders

November 14, 2021

State management is one of the most important aspects of React development. However, not every state update should result in a re-render. This article covers how to prevent unnecessary state update re-renders by avoiding the state update or triggering the state update with the existing state.

How To Mock A React Component In Jest

November 07, 2021

Mocking React components is a crucial skill for creating proper React tests. This article will show you how to mock your React components in different scenarios using Jest, namely default exported components, named exported, components that come from ES6 modules and including the props with them.

This Is My 10 Questions React Code Reviewing Routine

October 24, 2021

As a React developer, reviewing is part of our daily responsibilities. However, knowing what to focus on during React reviews isn't a trivial task. This article shares all the questions that I ask myself when reviewing React code and will help you navigate your way through React reviews.

4 Common Patterns You Can Easily Focus On In Your React Code Reviews

October 18, 2021

Besides development, React design patterns can also be used to increase the quality of code reviews. However, doing so isn't trivial and requires a different understanding. This article covers how to easily integrate several common React patterns into your React reviews.

My Simple Checklist For Well Tested React Components

September 26, 2021

Testing components is important in React development but is also often overlooked and neglected. After several years of not knowing what to test or how to approach it, I came up with a testing checklist. This article shares that checklist, discusses the topics, and will help you reach better tested React components.

How To Have More Efficient Meetings As An Engineering Team

September 18, 2021

Everyone hates meetings, especially bad ones. But in the current pandemic situations, remote meetings are part of our work more than ever. This article shares 5 actionable tips that helped us increase the efficiency of our meetings as an engineering team.

React Readability Analysis Of Implementing Custom Hooks

September 13, 2021

Custom hooks are essential to implementing logic flows and making any React app interactive. This article will cover 3 approaches to implementing customs hooks in React and analyze their level of readability.

5 Actionable Tips To Deliver Higher Quality Code Reviews Today

September 02, 2021

Reviewing is a core process in software development, but not all code reviews are created equally. This article shares 5 actionable tips that helped me deliver higher quality code reviews and will help you take your code reviews to the next level.

What Are Proper Use Cases For Snapshot Testing React Components?

August 28, 2021

Snapshot testing your React components is convenient, easy, and low effort, but they are also unreliable, unrealistic, and volatile. Over the years, they have fallen out of favour in the field of React testing. This article looks into the remaining proper use cases for snapshot testing React components.

How Readable Are Your React Component's TypeScript Props Typing?

August 15, 2021

One of the most common usages of TypeScript in a React codebase is typing a component's props. But have you ever thought about how readable your component's props typing is? Let's find out by analysing three different implementation approaches.

React Readability Analysis Of Inline Conditional Rendering

August 01, 2021

Showing UI elements conditionally to users is essential to make any React app interactive and more than a static website. Based on different inputs and interactions, your React app will render different elements. This article will cover the 2 most common approaches to implement inline conditional rendering in React and analyze their level of readability.

How To Write Readable React Content States

July 20, 2021

Content streams are an important part of any React project, but also introduces a lot of complexity. Long term, making sure that the code is readable has a serious impact on the maintainability. This article will cover and analyze the readability of two fundamental approaches to handling content states in your React components.

How To Mock Only One Function From A Module In Jest

April 18, 2021

In this article, I go over the different available mocking approaches, the differences between them, and the different use cases for mocking one particular function from an imported module in Jest.

Think About Your Reviewers

May 22, 2020

A story, self reflection, and learning from an early stage in my engineering job about how I totally forgot about the most important audience of all: reviewers.

Your Code Doesn't Have to Be Perfect

January 20, 2020

A story from an early stage in my engineering job about how I tried too much to come up with the perfect solution, rather than keeping it simple and not unnecessarily wasting time, and a reflection of what I could've done different.

Why I'll definitely use mapDispatchToProps in Redux

January 05, 2020

Why using the second argument of Redux's `connect` function will lead to more maintainable and higher quality React code, as well as significantly improving how you're able to test your components.

My first week of open source: how I got involved, and what I’ve learned

June 13, 2018

When I started to write this post, I had finished my first serious week of contributing to open source. I mainly contributed to the project Storybook. This post will describe the contributions and interactions that took place this week. It will also focus on the path that led up to this week.