Douglas Moura

Douglas Moura

Software Engineer

Douglas Moura

Douglas Moura

I write about TypeScript, React and Node.js.

#javascript

Rendering JSX on the Server with Fastify

Published at:Published at:Updated at:

Rendering JSX on the Server with Fastify
JSX is an excellent abstraction for building web interfaces. Introduced by Facebook and popularized by React, it's an extension of…

Generating MD5 hashes on Node.js

Published at:Published at:Updated at:

Generating MD5 hashes on Node.js
You can create hashes in Node.js without the need to install any external library. Usually, I create the following utility function in the…

Finding the greatest common divisor in TypeScript

Published at:Published at:Updated at:

Finding the greatest common divisor in TypeScript
First described in the classic geometry book Elements, by the ancient Greek mathematician Euclid (ca. 300 BC, at the book VII, proposition…

Understanding Tail Call Optimization With JavaScript

Published at:Published at:Updated at:

Understanding Tail Call Optimization With JavaScript
Consider the following function that calculates the factorial of a number:

Creating native modals with the dialog element

Published at:Published at:Updated at:

Creating native modals with the dialog element
Using custom dialog elements instead of native browser implementations, such as alert, confirm, or prompt, has become the standard for web…

Using fetch with TypeScript

Published at:Published at:Updated at:

Using fetch with TypeScript
Since fetch) is pratically universally supported on the most used web browsers, we may safely drop the use Axios and other similar…

What is a first-class citizen in computer science?

Published at:Published at:Updated at:

What is a first-class citizen in computer science?
In computer science, a first-class citizen is an entity that supports all operations available to other entities. Some of the available…

Use GitHub actions to publish your package on NPM

Published at:Published at:Updated at:

Use GitHub actions to publish your package on NPM
Recently, I created a package with the ESLint settings I like to use in my React projects, as I was tired of always having to configure it…

Create beautiful placeholders for your images

Published at:Published at:Updated at:

Create beautiful placeholders for your images
Have you ever faced the situation where the layout of your beautifully crafted interface "breaks" if the image (depeding on the quality of…

How to extend HTML elements with React

Published at:Published at:Updated at:

How to extend HTML elements with React
Most of the work needed to create custom HTML elements that fit the design system of your company resides styling and adding your own…