You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think promise is a pretty big section that should probably be split into its own lesson
Some issues I'm seeing:
we should encourage reject(new Error('str')) rather than rejecting with strings
we should encourage capitalizing Promise constructor
Promise.reduce() and catching SyntaxError is not part of the Promise spec; I guess we should decide whether the lesson uses simple ES6 promises, or Bluebird, or a bit of both
.then(onResolve, onReject) should be described a bit
memoization seems like a bit of an advanced pattern, I think it's generally not needed and might just confuse students as they are trying to learn the basics
Promise.resolve, Promise.reject and Promise.all should be described somewhere
instead of using reduce the last examples should be using map (reduce is used when you want to resolve to a single value, e.g. getting the max width of all loaded images)
I think promise is a pretty big section that should probably be split into its own lesson
Some issues I'm seeing:
reject(new Error('str'))
rather than rejecting with stringsPromise.reduce()
and catching SyntaxError is not part of the Promise spec; I guess we should decide whether the lesson uses simple ES6 promises, or Bluebird, or a bit of both.then(onResolve, onReject)
should be described a bitPromise.resolve
,Promise.reject
andPromise.all
should be described somewherereduce
the last examples should be usingmap
(reduce is used when you want to resolve to a single value, e.g. getting the max width of all loaded images)for e.g.
Or with ES6:
Or with error handling:
The text was updated successfully, but these errors were encountered: