dillon1000/react
Commit
Browse files Update blog post which creates unhandled promise rejection (#9668)
* Update 2015-12-16-ismounted-antipattern.md In case anybody else stumbles across this old blog post, I wanted to submit a patch to help with unhandled rejections. `#then` and `#catch` each return new Promise instances, so here we actually create two new promises (that aren't assigned). If the argument promise to `#makeCancelable` rejects, the promise created by `#then` will be an unhandled rejection, which in Node 7 will be an uncaught error. By using the second argument of `#then` to handle rejections instead, we don't need to worry about the runtime finding any unhandled rejections here. * Style updates * Add update notice
Changed paths1 file
First-parent comparisondocs/_posts/2015-12-16-ismounted-antipattern.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…