React is dominating the Javascript “frameworks world”. It has surpassed Angular in it’s popularity, amount of 3rd party libraries, downloads and even job listings. If you are using React, then you should also be testing your code. However, there are some best practices and concepts which should be taken into account, especially when you are testing asynchronous code. In this post we will cover the concept of testing the “sad path” of your asynchronous React component.

Tools Of The Trade

Before we get into the fun, it’s important to know which tools to use. The following setup I use is quickly becoming the ‘standard’…


As client side applications become more complex, their bundle sizes become bigger and bigger. Devices and regions with slower connections suffer the most from increasing bundle sizes and it’s just getting worse every day. In this post I will go over a real world example from my work at Wix where I was able to trim my bundle size by about 80% using Webpack Analyzer and React Lazy/Suspense.

How Early Should I Optimize?

If you are just getting started with your new and shiny web application, you are probably trying to focus on getting off the ground and making your product come to life. You…


Over the last few years, web developers have been told that perceived performance is the holy grail of web optimization. And indeed, I have been preaching this concept myself for years and it has served me and my customers well.

What is perceived performance?

Perceived performance is a metric of how fast a user thinks your site is and not actually how fast it loads according to your measurements. The main concept is to make your users think your website is fast by showing them progress bars, loading images in the back, getting data asynchronously and so on. …


Redux has become one of the most popular Javascript state management libraries in the world. Personally, I love Redux and I use it all the time with my countless React apps. However, I, like many others, feel that there is a lot of boilerplate associated with using Redux…

Enter “Redux Cornell”.

Before we dive in…

In 2017 we lost Chris Cornell who was an amazing singer and song writer. I decided to name this new library after him as a small token of my appreciation to the years of amazing music Chris has given us. We miss you Chris…

“Say hello to heaven…”

Chris Cornell 1964–2017 (Picture credit to weedstream.net)

So what is Redux Cornell?

A…


If you have been using React, there is a 100% chance that you know the pattern of initializing a component’s state in it’s constructor. However, there have always been several issues with this pattern and now thanks to Definitely Typed — React, we are ‘forced’ to tackle these issues.

Before we dive in, I will just say that my examples are going to be based on Typescript, however, the same ideas/principals are relevant for Javascript.

Common Component’s State Issue

Let’s start by looking at this simple component, which receives props (a superhero’s name) and has an internal state (the superhero’s health).

Up until…


If you have been using React, there is a 100% chance that you know the pattern of initializing a component’s state in it’s constructor. However, there have always been several issues with this pattern and now thanks to Definitely Typed — React, we are ‘forced’ to tackle these issues.

Before we dive in, I will just say that my examples are going to be based on Typescript, however, the same ideas/principals are relevant for Javascript.

Common Component’s State Issue

Let’s start by looking at this simple component, which receives props (a superhero’s name) and has an internal state (the superhero’s health).

Up until…


If you have been using React, there is a 100% chance that you know the pattern of initializing a component’s state in it’s constructor. However, there have always been several issues with this pattern and now thanks to Definitely Typed — React, we are ‘forced’ to tackle these issues.

Before we dive in, I will just say that my examples are going to be based on Typescript, however, the same ideas/principals are relevant for Javascript.

Common Component’s State Issue

Let’s start by looking at this simple component, which receives props (a superhero’s name) and has an internal state (the superhero’s health).

Up until…


If you have been using React, there is a 100% chance that you know the pattern of initializing a component’s state in it’s constructor. However, there have always been several issues with this pattern and now thanks to Definitely Typed — React, we are ‘forced’ to tackle these issues.

Before we dive in, I will just say that my examples are going to be based on Typescript, however, the same ideas/principals are relevant for Javascript.

Common Component’s State Issue

Let’s start by looking at this simple component, which receives props (a superhero’s name) and has an internal state (the superhero’s health).

Up until…


Redux has become one of the most popular Javascript state management libraries in the world. Personally, I love Redux and I use it all the time with my countless React apps. However, I, like many others, feel that there is a lot of boilerplate associated with using Redux…

Enter “Redux Cornell”.

Before we dive in…

In 2017 we lost Chris Cornell who was an amazing singer and song writer. I decided to name this new library after him as a small token of my appreciation to the years of amazing music Chris has given us. We miss you Chris…

“Say hello to heaven…”

Chris Cornell 1964–2017 (Picture credit to weedstream.net)

So what is Redux Cornell?

A…


Over the last few years, web developers have been told that perceived performance is the holy grail of web optimization. And indeed, I have been preaching this concept myself for years and it has served me and my customers well.

What is perceived performance?

Perceived performance is a metric of how fast a user thinks your site is and not actually how fast it loads according to your measurements. The main concept is to make your users think your website is fast by showing them progress bars, loading images in the back, getting data asynchronously and so on. …

Eyal Eizenberg

Team Lead @ Wix

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store