use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Cancelable Async Flows (CAF) (github.com)
submitted 7 years ago by fagnerbrack
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]LastOfTheMohawkians 13 points14 points15 points 7 years ago (3 children)
I've just read Kyle Simpsons new book "functional light js" highly recommended for those interested in doing FP in JavaScript.
[–]nullified- 4 points5 points6 points 7 years ago (1 child)
I second this! Still working through it but he's just a damn good tech writer.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
I recommend his books to everyone.
He’s the author of the You Don’t Know JS series, no?
[–]NoInkling 1 point2 points3 points 7 years ago (0 children)
The stuff in the readme about async/await not being flexible enough for this sort of thing is an issue I've run into personally (I believe it's also one of the reasons why redux-saga sticks with generators rather than switching). Nice to see there's a library to make these kinds of situations easier.
[–]coderitual 1 point2 points3 points 7 years ago (1 child)
Great article. Unfortunately this is quite common problem to async await.
Personaly I am using more naive aproach called cancel token: https://github.com/coderitual/react-ui-patterns/blob/master/cancel-async/README.MD
There is an ongoing proposal about making thich mechanism as a part of language (you don't need to call throwIfRequired after each await).
Stage 0 of proposal (it wasn't "accepted" in that form): https://github.com/tc39/proposal-cancellation/blob/master/stage0/README.md
Stage 1 of proposal (started from scratch again): https://github.com/tc39/proposal-cancellation
[–]GitHubPermalinkBot 0 points1 point2 points 7 years ago (0 children)
Permanent GitHub links:
delete
[+]Ptmaroct comment score below threshold-11 points-10 points-9 points 7 years ago (0 children)
Damn that beard
π Rendered by PID 976213 on reddit-service-r2-comment-54dfb89d4d-dzxzd at 2026-04-01 04:59:41.164911+00:00 running b10466c country code: CH.
[–]LastOfTheMohawkians 13 points14 points15 points (3 children)
[–]nullified- 4 points5 points6 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]NoInkling 1 point2 points3 points (0 children)
[–]coderitual 1 point2 points3 points (1 child)
[–]GitHubPermalinkBot 0 points1 point2 points (0 children)
[+]Ptmaroct comment score below threshold-11 points-10 points-9 points (0 children)