この記事の対象読者:営業・企画・カスタマーサクセスの非エンジニア、初級エンジニア、プリセールス志望の方 執筆者について:運用チーム内の開発ポジションで、小規模案件をヒアリング〜実装まで一貫して担当。前職ではプリセールスエンジニアとし ...
1. What is a Promise? Simple Definition: A Promise is an object in JavaScript that represents the eventual result of an asynchronous operation — it is a placeholder for a value that is not available ...
前回はイベント処理を扱いました。ボタンのクリックやフォームの送信に反応する処理、そしてevent.preventDefault()でDjangoのAPIと繋ぐ準備も見えてきましたね。 今回は非同期処理です。DjangoのAPIにデータを取りに行く処理は「非同期」で行います。ここはPython ...
JavaScriptのasync/awaitを使った非同期処理の基本や、Web API呼び出しの流れをわかりやすく解説します。 Promiseとの関係やデータ取得処理の書き方を学び、効率的なJavaScript開発に役立つ知識を紹介します。
Asynchronous code (async code) says: go do something while I do other things, then let me know what happened when the results are ready. Also known as concurrency, async is important in a variety of ...
async function getStarWarsData() { try { const response = await fetch('https://swapi.dev/api/people/1/'); const data = await response.json(); console.log(data ...