Serial type versus identity columns in PostgreSQL and TypeORM

In this article, we compare primary keys with the serial type and identity columns in PostgreSQL and TypeORM | Continue reading


@wanago.io | 3 years ago

API with NestJS #3. Authenticating users with bcrypt, Passport, JWT, and cookies

1. API with NestJS #1. Controllers, routing and the module structure2. API with NestJS #2. Setting up a PostgreSQL database with TypeORM3. API with NestJS #3. Authenticating users with bcrypt, Passport, JWT, and cookiesAuthentication is a crucial part of almost every web applicat … | Continue reading


@wanago.io | 4 years ago

API with NestJS #2. Setting up a PostgreSQL database with TypeORM

1. API with NestJS #1. Controllers, routing and the module structure2. API with NestJS #2. Setting up a PostgreSQL database with TypeORMThe next important thing when learning how to create an API is how to store the data. In this article, we look into how to do so with PostgreSQL … | Continue reading


@wanago.io | 4 years ago

API with NestJS #1. Controllers, routing and the module structure

We've figured out what is a Controller in NestJS and how to handle routing in our application. We've also touched the topic of Services & Modules. | Continue reading


@wanago.io | 4 years ago

Getting geeky with Git #3. The branch is a reference

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. | Continue reading


@wanago.io | 4 years ago

TypeScript Express Tutorial #15. Using Put vs. Patch in MongoDB with Mongoose

Most of the HTTP methods are straightforward, but in Express, PUT and PATCH methods cause some misinterpretation. Here, we compare them both. | Continue reading


@wanago.io | 4 years ago

TypeScript Express Tutorial #14. Code Optimization with Mongoose Lean Queries

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. | Continue reading


@wanago.io | 4 years ago

Getting geeky with Git. Remotes and upstream branches

We look into what is a remote and what the origin keyword means. We check out what is an upstream branch and how we can benefit from defining it. | Continue reading


@wanago.io | 4 years ago

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 immutabi … | Continue reading


@wanago.io | 4 years ago

TypeScript type inference with const assertions and the infer keyword

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 and const assertions. The b … | Continue reading


@wanago.io | 4 years ago

Race conditions in React and beyond. A race condition guard with TypeScript

Fetching resources is a bread and butter of the frontend development. When doing so, we might encounter a set of issues related to race conditions. In this article, we identify them and provide a solution. Defining a race condition The term “race condition” dates back to as far a … | Continue reading


@wanago.io | 5 years ago

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 … | Continue reading


@wanago.io | 5 years ago

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. Intr … | Continue reading


@wanago.io | 5 years ago

Understanding how async await is implemented in JavaScript (2018)

Generators are a new feature introduced in ES6, and as I’ve promised in the article about async/await last week, we will cover them today. Iterators In JavaScript an iterator is an object that provides a next() method which returns the next item in the sequence. The first concept … | Continue reading


@wanago.io | 5 years ago

JavaScript design patterns #5. The Observer pattern with TypeScript

1. JavaScript design patterns #1. Singleton and the Module2. JavaScript design patterns #2. Factories and their implementation in TypeScript3. JavaScript design patterns #3. The Facade pattern and applying it to React Hooks4. JavaScript design patterns #4. Decorators and their im … | Continue reading


@wanago.io | 5 years ago

JavaScript Testing #6. Introduction to End-to-End Testing with Cypress

In this article, we look into End-to-End testing and implement it using the Cypress framework. | Continue reading


@wanago.io | 5 years ago

JavaScript design patterns #4. Decorators and their implementation in TypeScript

1. JavaScript design patterns #1. Singleton and the Module2. JavaScript design patterns #2. Factories and their implementation in TypeScript3. JavaScript design patterns #3. The Facade pattern and applying it to React Hooks4. JavaScript design patterns #4. Decorators and their im … | Continue reading


@wanago.io | 5 years ago

JavaScript testing #5. Testing hooks with react-hooks-testing-library and Redux

1. JavaScript testing #1. Explaining types of tests. Basics of unit testing with Jest2. JavaScript testing #2. Introducing Enzyme and testing React components3. JavaScript testing #3. Testing props, the mount function and snapshot tests.4. JavaScript testing #4. Mocking API calls … | Continue reading


@wanago.io | 5 years ago

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

1. JavaScript design patterns #1. Singleton and the Module2. JavaScript design patterns #2. Factories and their implementation in TypeScript3. JavaScript design patterns #3. The Facade pattern and applying it to React HooksThe essential thing when approaching design patterns is t … | Continue reading


@wanago.io | 5 years ago

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

1. JavaScript design patterns #1. Singleton and the Module2. JavaScript design patterns #2. Factories and their implementation in TypeScriptAs discussed in the previous part of this series, there are many design patterns out there. Some of them fit well into the JavaScript langua … | Continue reading


@wanago.io | 5 years ago

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 … | Continue reading


@wanago.io | 5 years ago

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 explan … | Continue reading


@wanago.io | 5 years ago

JavaScript design patterns #1. Singleton and the Module

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 … | Continue reading


@wanago.io | 5 years ago

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: w … | Continue reading


@wanago.io | 5 years ago

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 slightl … | Continue reading


@wanago.io | 5 years ago

Understanding JavaScript Proxy. Preserving Backward Compatibility in a Library

One of the features that can be useful to you is a JavaScript Proxy. We go through its functionalities and figure out some of its use-cases. | Continue reading


@wanago.io | 5 years ago

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 featu … | Continue reading


@wanago.io | 5 years ago

Regex course – part four. Avoiding catastrophic backtracking using lookahead

Continue reading


@wanago.io | 5 years ago

Bug-Proofing Our Application with Error Boundaries and the Strict Mode

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 of our job is to prepare f … | Continue reading


@wanago.io | 5 years ago

Installing a Progressive Web App. Writing a Web App Manifest

Facebook Dating's US rollout includes a few new updates, including safety features and more Instagram integration. | Continue reading


@wanago.io | 5 years ago

Internationalization API Built into the Browser

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 is internationalization. … | Continue reading


@wanago.io | 5 years ago

Making the job of garbage collector easier by replacing the Map with the WeakMap

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 Map. The above aims to introdu … | Continue reading


@wanago.io | 5 years ago

The process of rendering a page. Increasing the performance by reducing reflow

We cover how the browser renders the page, what are the reflow, paint, and composition processes and how we can optimize the rendering. | Continue reading


@wanago.io | 5 years ago

Creating a Material Design Slider with Web Components. The Shadow DOM Concept

Renee Holland sent her Facebook friend thousands of dollars. She became entwined in a global fraud that the social network and the United States military appear helpless to stop. | Continue reading


@wanago.io | 5 years ago

TypeScript Express Tutorial #11. Node.js Two-Factor Authentication

We go through the principles and implementation of Node.js Two-Factor Authentication (2FA). We use Google Authenticator and the Express Node.js server. | Continue reading


@wanago.io | 5 years ago

Algorithm React uses to update the view. Increasing performance of a component

We look into how React checks if the view should be updated & use the tools like the shouldComponentUpdate, PureComponent & memoization | Continue reading


@wanago.io | 5 years ago

What are symbols and how they can be useful to you

The symbol is a new primitive value introduced by ES6. It aims to provide us with unique identifiers. In this article, we explore how it works, in what way it is used in the JavaScript language and how we can benefit from that. Creating symbols To create a symbol, we use its cons … | Continue reading


@wanago.io | 5 years ago

Creating a simple drawing app using canvas. Saving and loading images

In this article, we grasp the very basics of a canvas. We learn every piece of knowledge that is needed to create a simple drawing app that can also save our images and load them back to the editor. The basics of a canvas With the [crayon-5d107c0ee4ed1826255578-i/] element, we ca … | Continue reading


@wanago.io | 5 years ago

Using Push Notifications with Service Workers and Node.js

In this article, we cover another feature that we can implement with the help of Service Workers – Push Notifications. They come in handy if we need a fast channel of communicating with our users. We not only learn how to implement them in terms of code, but we also explore the U … | Continue reading


@wanago.io | 5 years ago

The basics of Service Workers: how should our application behave when offline?

In this article, we cover service workers. They aim to solve a particular problem: how should our application behave when we’re offline? A service worker is a script, that runs in the background, separate from our web page and all new major browsers support it. Using the cache me … | Continue reading


@wanago.io | 5 years ago

React SSR with Next.js 1. Concept of Server Side Rendering and Basics of Routing

Today we covered the very basics of React Next.js Server-Side Rendering and learned about both the benefits and disadvantages of that solution. | Continue reading


@wanago.io | 5 years ago

Node.js TypeScript #14. Measuring Processes and Threads with Performance Hooks

We learn how to measure the time of the execution of different parts of our application using the Performance Timing API. | Continue reading


@wanago.io | 5 years ago

Node.js TypeScript #13. Sending Data Between Worker Threads

In this article, we dive deeper into Node.js Worker Threads, focusing on how can we communicate between Worker Threads and send data. | Continue reading


@wanago.io | 5 years ago

Node.js TypeScript #11. Harnessing the power of many processes using a cluster

In this article, we learn how to launch a cluster of processes that share server ports and automatically distribute the workload over them. | Continue reading


@wanago.io | 5 years ago

Creating malicious packages and dealing with them using NPM audit

The world is a tough place - a lot of people out there to get you! NPM happens to serve malicious code every now and then - let's use npm audit. | Continue reading


@wanago.io | 5 years ago

Node.js TypeScript #9. The Event Loop in Node.js

In this part of the course, we cover setTimeout, setInterval, setImmediate, and process.nextTick. To do it, we go through the event loop. | Continue reading


@wanago.io | 5 years ago

Node.js TypeScript #7. Creating a server and receiving requests

1. Node.js TypeScript #1. Modules, process arguments, basics of the File System2. Node.js TypeScript #2. The synchronous nature of the EventEmitter3. Node.js TypeScript #3. Explaining the Buffer4. Node.js TypeScript #4. Paused and flowing modes of a readable stream5. Node.js Type … | Continue reading


@wanago.io | 5 years ago

TypeScript Express Tutorial #10. Testing Express Applications

Testing express by writing unit and integration tests with Jest & SuperTest. Faking the database connection to keep tests independent from external factors | Continue reading


@wanago.io | 6 years ago