Join Carl Peaslee for an in-depth discussion in this video Promises, part of React: ES6, ES2016, and Beyond.
Here on line two, I've created a function…that returns a Promise.…And this is a common way to use Promises.…You have a function that returns them.…So our function is going to return a new Promise,…and our new Promise method expects…a function as its argument,…and that function should have two more arguments,…which are resolve and reject.…And resolve and reject are themselves functions…that we'll invoke inside of our Promise.…So we'll invoke resolve…when our Promise has basically done what we want it to,…
- Using const and let
- Importing and exporting modules
- Arrow functions
- Destructing assignments
- Arguments and template literals
- Extended parameter handling with the spread operator
- Generating custom styles
- Classes, getters and setters
Skill Level Intermediate
React.js: Building an Interface (2016)with Ray Villalobos1h 21m Intermediate
1. Variables and Declarations
2. Arguments and Template Literals
4. Promises and Async
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.