Category: JavaScript

JavaScript React

JavaScript design patterns #3. The Facade pattern and applying it to React Hooks

This entry is part 3 of 3 in the JavaScript design patterns

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. That doesn’t change the fact that we can take its fundamentals and apply them […]

JavaScript

JavaScript design patterns #2. Factories and their implementation in TypeScript

This entry is part 2 of 3 in the JavaScript design patterns

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. We also implement it in TypeScript. There seems to some confusion regarding […]

JavaScript

Exploring the caching in the browser. Clarifying the cache-control header

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. Caching Implementing a cache mechanism means storing a copy of […]

JavaScript React

Understanding the useEffect hook in React. Designing custom hooks

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, it needs more explanation. In this article, we look into […]

JavaScript

JavaScript design patterns #1. Singleton and the Module

This entry is part 1 of 3 in the JavaScript design patterns

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, when formalized, are called design patterns. Today we look into […]

JavaScript React

Current state of the Concurrent Mode in React

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 first thing to ask would be: what is the Concurrent Mode? […]

JavaScript React

Writing React forms with Formik. Validating data using Yup

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 in your team has a slightly different approach, it may turn out to be messy. With […]

Express JavaScript Node.js

TypeScript Express tutorial #12. Creating a CI/CD pipeline with Travis and Heroku

This entry is part 12 of 12 in the TypeScript Express tutorial

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 Travis and Heroku can be tried out for free. Continuous […]

JavaScript

Measuring the quality of the User Experience with the User Timing API

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 determinant of how the features that we implement […]