All of it for free.
Note: I am not affiliated in any…
Let’s imagine the scenario:
To solve our issue, we probably have added the unwanted file to our .gitignore file and hoped that this solves our issue. It turns out it’s not enough.
It’s not enough, because these files are still present in our repository index. …
In order to successfully introduce anti-patterns to the codebase, developer has to bypass several guards, i.e. code review.
The article is sarcastic. It is meant to show us the importance of quality code review.
In this article I will show some patterns how to write a legitimate looking code that over time will add up to create really bad codebase.
I can think of at least four reasons why a software developer willingly want to introduce anti-pattern:
I think every React developer sooner or later gets the following warning in his console: Each child in a list should have a unique “key” prop.
In this article I will use real life example why it’s important not to ignore that warning.
We will learn about one anti-pattern and one recommended solution.
The article is based on React examples but same concept applies to other FE libraries i.e. Vue.
Save the team and yourself from bugs and always use stable, unique identifiers as list keys instead of array indexes.
To start with, let’s consider how do we get the…
Pure Functions is one of these terms that yet again sound very elitist and difficult to understand. In fact it’s rather simple concept.
The pure function is very commonly used by lot’s of major players i.e. Redux, React, Angular and so on. We can also extract expensive pure function to a web worker and increase performance of our application. There are plenty of potential use cases.
As such it’s a must have in every developer toolbox.
In this article I will explain the…
Things become much easier to understand once we check what the
newis doing behind the scenes.
In this article I will go through simple examples and show you what’s
new is doing for us behind the scenes.
Since ES6 we don’t see
newthat often anymore but it’s still a must have knowledge for any dev.
Let’s use the very classic example.
Suppose we need a function that creates us an
employee object. …
The Immediately Invoked Function Expression term sounds very elitist and advanced but truth is it’s very simple.
I’ve prepared some examples for you as well as common traps you might encounter during the job interview.
The IIFE is a way to execute functions immediately, as soon as they are created. We can do that by enclosing the entire function in brackets, followed by
It’s a good way to protect the scope of your function and the variables defined in it. The IIFE creates it’s own scope.
Basic syntax (note the wrapping parenthesis)
Closures are special thing in the JS world. It’s time to finally understand them.
Many agree that closures are confusing at the beginning, but once you put some time into understanding them you will find them perhaps even intuitive.
There are lot’s of benefits coming from understanding them i.e.:
Every frontend developer at some point of his career has stumbled into
It turns out that in fact
Let’s solve this riddle.
If you are looking into
thisit probably means one of the three things:
this. Or maybe you have to support some legacy project
Higher Order Components in React are considered an advanced React topic.
I will try to simplify it and show one real life example that we will hopefully use (or base on it) in real life.
Let’s consider our day to day task which is to fetch data from somewhere and display them in the UI. We also need to handle errors and show loader messages to the user. This article will focus on the loader component.
For the sake of this exercise we will consider two approaches: