Javascript

Vue.jsのライフサイクルフックを理解する — step-by-step Javascript tutorial on Progressive Robot

Vue.jsのライフサイクルフックを理解する

ライフサイクルフックは、使用しているライブラリがバックグラウンドでどのように機能するのかを見せてくれます。ライフサイクルフックを使用すると、コンポーネントの作成、DOMへの追加、更新、または破壊がいつ行われたかを確認することができます。この記事では、作成、マウント、更新、破壊のフックを紹介します。

Read more
Using the React-Async Library for Declarative Data Fetching — step-by-step Javascript tutorial on Progressive Robot

Using the React-Async Library for Declarative Data Fetching

The combination of React and `async-await` leads to a mixed pattern in which we have both imperative code (for data fetching) and declarative code (for UI composition). [React-async](https://github.com/ghengeveld/react-async) provides a declarative API to perform any REST API calls using a single React component, allowing declarative programming to be used throughout the application. In this article, we will explain how the React-Async library helps us fetch data.

Read more
An Introduction to Closures and Currying in JavaScript — step-by-step Javascript tutorial on Progressive Robot

An Introduction to Closures and Currying in JavaScript

If you write code in JavaScript it’s quite likely you have come across the term `closure`, which is a useful yet often confusing concept. But just what is a closure? And what is currying? In this tutorial we’ll explain these terms and demonstrate their use with example JavaScript code.

Read more
A Fetch API Primer — step-by-step Javascript tutorial on Progressive Robot

A Fetch API Primer

In this quick post we’ll go over using the Fetch API to GET or POST some JSON data to an external resource. We’ll also go over proper error handling.

Read more
How To Handle CPU-Bound Tasks with Web Workers — step-by-step Javascript tutorial on Progressive Robot

How To Handle CPU-Bound Tasks with Web Workers

In this tutorial, you will create a CPU-bound task that blocks the main thread in the browser and observe how it affects the web app. You will then unsuccessfully attempt to make a CPU-bound task non-blocking using promises. Finally, you will create a Web Worker to offload a CPU-bound task to another thread to prevent it from blocking the main thread.

Read more
CHAT