Express JavaScript TypeScript

TypeScript Express tutorial #14. Code optimization with Mongoose Lean Queries

This entry is part 14 of 15 in the TypeScript Express tutorial

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 part of this series, we’ve created our first models. They allow […]

Git

Getting geeky with Git #2. Building blocks of a commit

This entry is part 2 of 3 in the Getting geeky with Git

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 of files. Git is a Distributed Version Control System To understand what […]

Git JavaScript

Getting geeky with Git #1. Remotes and upstream branches

This entry is part 1 of 3 in the Getting geeky with Git

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 also check out what is an upstream branch and how we can benefit […]

JavaScript

Building forms using Formik with the React Hooks API and TypeScript

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 of Formik with TypeScript Form handling in React might […]

JavaScript

What’s the deal with immutability in JavaScript?

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 values, assignment immutability, and how to keep our data structures immutable. We also look […]

JavaScript React

Functional React components with generic props in TypeScript

One of the qualities of our code that we should aim for is reusability. Also, following the Don’t Repeat Yourself principle makes our code more elegant. In this article, we explore writing functional React components with TypeScript using generic props. By doing so, we can create reusable and flexible components. If you would like to […]

JavaScript TypeScript Uncategorized

More advanced types with TypeScript generics

Previously, we’ve discussed the basics of TypeScript Generics. This time, we take them to a higher level. In this article, we learn about index types. To do so, we also explore union types, the keyof keyword, and string literal types. Today we also learn mapped types and use them with conditional types. Index types Generics are very useful in many situations. […]

Uncategorized

TypeScript Generics. Discussing naming conventions

We can find the concept of generic types across many languages such as Java, C#. Naturally, they found their way into TypeScript. In this article, we discuss their purpose and provide various examples. We also discuss naming conventions for generics that we can stumble upon. Introducing TypeScript Generics One of the qualities that we strive […]