What's the difference between promise.then(fn, fn) and promise.then(fn).catch(fn) when using JavaScript promises?
![JavaScript Promises: then(f,f) vs then(f).catch(f)](https://cdn-ak-scissors.b.st-hatena.com/image/square/613007cf56613944439e056392fdd938e62b723d/height=288;version=1;width=512/https%3A%2F%2Fdmitripavlutin.com%2Fjavascript-promises-then-vs-then-catch%2Fcover.png)
What's the difference between promise.then(fn, fn) and promise.then(fn).catch(fn) when using JavaScript promises?
The callbacks, event handlers, higher-order functions can access outer scope variables thanks to the closure. The closure concept is important in functional programming and is often asked during the JavaScript coding interview. While being used everywhere, closures are difficult to grasp. If you haven't had your "Aha!" moment in understanding closures, then this post is for you. I'll start with th
Users enjoy fast and responsive user interfaces (UI). A UI response delay of fewer than 100 milliseconds feels instant to the user. But a delay between 100 and 300 milliseconds is already perceptible. To improve user interface performance, React offers a higher-order component React.memo(). When React.memo() wraps a component, React memoizes the rendered output of the wrapped component and then sk
1. The mystery of this this keyword has been a mystery for me for a long time. From a background like Java, PHP or other standard language, this is the instance of the current object in the class method. this cannot be used outside the method and such a simple approach does not create confusion. In JavaScript the situation is different: this is the context of a function invocation (a.k.a. executio
To reduce such errors, you have to understand the cases when undefined is generated. Let's explore undefined and its effect on code safety. Before I go on, let me recommend something to you. The path to becoming good at JavaScript isn't easy... but fortunately with a good teacher you can shortcut. Take "Modern JavaScript From The Beginning 2.0" course by Brad Traversy to become proficient in JavaS
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く