Future Studio Tutorials

Public tutorial on Thursday. Wednesday is only.

Node.js — How to Fix ESM Error “Directory import is not supported resolving ES modules imported”

ECMAScript modules are an official standard describing a format on how to write reusable JavaScript code. Browsers used ECMAScript modules and Node.js had their own module loading implementation: CommonJS. Node.js added full ESM support starting from version 12. At the time of writing this tutorial, developers migrate their …

Continue Reading

JavaScript — Using the new Array Grouping Methods

Grouping array items is a common task in programming. You probably wrote a JavaScript grouping function multiple times in your projects. And in the future, you don’t necessarily have to do it again. JavaScript is getting support for array grouping with the static Object.groupBy and Map.groupBy methods. …

Continue Reading

JavaScript — Create Array from AsyncIterable

JavaScript has supported async iterators since ES2018. All modern browser versions handle async iterables and Node.js can do it since version 10.x. Async iterables have a positive aspect and a drawback at the same time: you need to consume them to know the result. That means you can’ …

Continue Reading

JavaScript — Cache Computation Results in a Local Variable

We’re using a small performance optimization in our code bases: caching computation results in local variables. Saving results in a local variable is borrowed from the memoization technique. Memoizing values improves the performance of function execution by storing the results and reusing them for a function call. This tutorial …

Continue Reading

fetch — Detect Network Error

We’re building a Vue.js application for a client project. This Vue.js app uses the useFetch composable from VueUse. This composable uses the browser’s fetch to send requests to a given URL and handle the responses. We wanted to integrate handling in the Vue.js app to …

Continue Reading

MySQL — Add Days to a Datetime

MySQL supports dates and date times as column types. It’s a nice way to keep track of when things happen or should happen. Working with dates and times can be hard, but adding days to a date time column value isn’t. This tutorial shows you how to add …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.