docs: Fix typos (#1981)
This commit is contained in:
parent
ed941a8f18
commit
000cc8382a
6 changed files with 7 additions and 7 deletions
|
|
@ -302,7 +302,7 @@ This example also illustrates another benefit of smaller functions: we reused th
|
|||
|
||||
### Why not callbacks
|
||||
|
||||
Callbacks are another mechanism for working with asynchrounous computations, and are indeed more adequate to use if an asynchronous computation may occur more than one time (for example, an `onscroll` event handler).
|
||||
Callbacks are another mechanism for working with asynchronous computations, and are indeed more adequate to use if an asynchronous computation may occur more than one time (for example, an `onscroll` event handler).
|
||||
|
||||
However, for asynchronous computations that only occur once in response to an action, promises can be refactored more effectively, reducing code smells known as pyramids of doom (deeply nested series of callbacks with unmanaged state being used across several closure levels).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue