Basefactor Blog

May 9th 2019

React class components pitfalls

Some months ago class components were cool, since the arrival of React Hooks not anymore, Why are class components not a great thing anymore? In this post we are going to enumerate the main paint points when working with class components.

February 3rd 2019

React how to display a loading indicator on fetch calls

When you are developing your web application, you have to perform asynchronous operations, e.g. perform a fetch/ajax call to obtain data from the server. Sometimes you need to do silent background operations, whereas in other cases you need to block the user interface or notify them that something is going on.

A typical way of handling this, is using a boolean flag to show/hide the spinner...

February 3rd 2019

Configuring aliases in webpack + VS Code + Typescript + Jest

This post is based on this excellent Gist created by Carlos Hidalgo.

When we use imports one of the most of the things that hurts is working with relative paths. Can you show me an example? Let's imagine we are working with the following folder structure...

January 24th 2019

ES6, For loops? Forget it!

Working with arrays, we usually fill in our code with loops, cases such as...

“Check that an element is in array...”

“Calculate total sales, if it's more than a given amount then offer free shipping costs...”

“Get annual sales average...”



C/ Pintor Martínez Cubells 5 Málaga (Spain)

General enquiries/

+34 693 84 24 54

Copyright 2018 Basefactor. All Rights Reserved.