Skip to content

Commit 8a2313e

Browse files
authored
let's not be too critical of promises
until we bring a better solution on the table
1 parent 96495e4 commit 8a2313e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pages/docs/manual/latest/promise.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,4 @@ myPromise
7777

7878
</CodeTab>
7979

80-
## Tips & Tricks
8180

82-
Promises aren't the best abstractions, especially in JavaScript. When used inside React or ReasonReact, [it is almost **always** wrong](https://twitter.com/search?q=(async%20OR%20promise)%20(from%3Asebmarkbage)&src=typed_query&f=live).
83-
84-
For that reason, we actually recommend judicious usages of callback-based apis, [like so](https://gist.github.com/chenglou/b6cf738a5d7adbde2ee008eb93117b49).
85-
86-
This applies to other leaky, slow and uncancellable, and [colored](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/) promise abstractions like `fetch`. Prefer using them only for interop, not for your core logic.

0 commit comments

Comments
 (0)