NestJS is a framework for building Node.js applications. It is somewhat opinionated and forces us to follow its vision of how an application should look like to some extent. That might be viewed as a good thing that helps us to keep consistency across ... more
Branches are the bread and butter of a software developer using a Version Control System ( VCS ) of any kind. Today we explore how they work in Git. In the previous part of this series, we’ve learned that a commit is a full snapshot of the project state. ... more
When we develop a REST API, we have a set of HTTP methods that we can choose. An important thing to understand is that HTTP methods are, to a large extent, indicators of actions. Therefore, it is our job to make them work properly. In theory, not much ... more
Mongoose does quite a bit of heavy-lifting for us. It is immensely useful, but not necessary in every case. In this article, we explore the Mongoose documents more and learn what we can achieve by giving up their benefits. Mongoose Document In the second ... more
As a developer, there is a high chance that you use Git every day. It means saving changes through commits . In this article, we look into what are their building blocks. This includes looking into the filesystem of Git and learning about different states ... more
Version control systems (VCS) are one of the essential tools of every programmer. The most popular one is Git, and therefore it is worth looking into it a bit more. In this article, we look into what is a remote and what the origin keyword means. We ... more
The Formik library keeps on growing and attempts to keep up with the React community. Formik, since version 2.0, has a built-in set of hooks. In this article, we go through all of them. We also look into how to use Formik with TypeScript. The basics ... more
The immutability is quite a buzzword lately. Today we attempt to find out why. In this article, we explain what the immutability is and how we can benefit from it. When defining immutability, we look into various aspects of it. We investigate primitive ... more
TypeScript works in a way that automates a lot of the work for us. We don’t have to write types every time, because the compiler works hard to derive them from the context. In this article, we look into more complex cases that involve the infer keyword ... more
One of the qualities of our code that we should aim for is reusability. Also, following the D on’t R epeat Y ourself principle makes our code more elegant. In this article, we explore writing functional React components with TypeScript using generic ... more
When we are cold, we put on a shirt. If that’s not enough, we put a coat on top. Decorators work similarly. In this article, we discuss the principles of the decorator design pattern and talk about their implementation in TypeScript. We also briefly ... more
The hooks are an exciting addition to React and undoubtedly one that helps us to separate the logic from the template. Doing so makes the above logic more testable. Unfortunately, testing hooks does not prove to be that straightforward. In this article, ... more
The essential thing when approaching design patterns is to utilize them in a way that improves our codebase. The above means that we sometimes can bend them to fit our needs. The Facade design pattern is commonly associated with object-oriented programming. ... more
As discussed in the previous part of this series, there are many design patterns out there. Some of them fit well into the JavaScript language, and they are often used. In this article, we discuss the factory method pattern and show some of its use-cases. ... more
The performance of our websites is an essential factor to consider. One of the ways to improve it is to cache our resources, and there are many ways to implement it. In this article, we define what caching is and go through the most common approaches. ... more
Hooks are quite a new feature in React. They seem to simplify how we add logic to our components. When I was starting to use them, most of them seemed straightforward. That didn’t apply to the useEffect hook. It might not be that uncomplicated, and therefore, ... more
While having a vibe of a mad genius might be tempting, reinventing the wheel is usually not the best way to approach designing your software. The chances are that somebody already had the same problem as you and solved it in a smart way. Such best practices, ... more
React is constantly expanding, and with that process, there are a few cool features coming. One of them is Concurrent Mode. In this article, we go through its principles and discuss its current state. We also look at what the future might bring. The ... more
Writing a React form without any additional dependencies isn’t much of a challenge itself. The same goes for applying client-side data validation. What might be troublesome is keeping all your forms consistent across a bigger project. If every developer ... more
While learning about various JavaScript features, it is usually not crucial to know them by heart. Sometimes it is very beneficial just to know what’s out there and what can we use it for. One of those features is a JavaScript Proxy . In this article, ... more
Once our application is up and running, we want to deploy it. In this article, we explain what Continous Integration (CI) and Continuous Delivery (CD) is. We use Travis and Heroku as an example, but the knowledge can be used with other tools also. Both ... more
The User Experience might be a bit subjective and hard to measure, but there are some parts of it that we can assess. In this article, we explore the User Timing API. With it, we can care for the performance of our applications even more. With a clear ... more
Our code can get quite complicated. The events handlers are triggered, the HTTP calls are made. We make a lot of stuff happen that we don’t know the outcome of. The more dependencies, the more difficult it is to predict how the function might behave. ... more
Regular expressions can help us solve many different problems. They can also be the source of our headaches. A recent Cloudfare outage happened due to a regular expression that caused CPU to spike to 100% on (…) machines worldwide . In this article, ... more
We all surely aim for our applications to be bug-proof. A part of it is covering your application with tests. Also, Airbnb claims that 38% of their bugs could have been prevented by TypeScript. We are not going to avoid all issues, unfortunately. A part ... more
The JavaScript is present in mobile apps development for quite some time now. Tools like React Native and Cordova have been around for years. Another valuable tool that we can use are Progressive Web Apps, and in this article, we go through the process ... more
There is a good chance that the application that you work on supports multiple languages. One of the things this includes is language-sensitive date handling. The most popular library that helps in achieving that is Moment.js. One of the things it handles ... more
When it comes to visualizing data, there are quite a few libraries out there. The level of abstraction they introduce varies. Libraries like C3 and Recharts depend on the Data-Driven Documents library – D3 . Learning D3 might mean dealing with more code. ... more
ECMAScript 6 introduces a lot of cool features that we are now quite familiar with. In this article, we talk about some of the data structures that it implements. To understand more sophisticated ones like the WeakMap, we also go through the regular ... more
Rendering a page is a complex process. When you change the DOM structure or modify the CSS, the browser needs to respond to that accordingly. By knowing how this operation takes place, you can alter your approach to increase performance. In this article, ... more