This Lesson is for PRO Members.

Subscribe today and get access to all lessons! Plus direct HD download
for offline use, member comment forums, and iTunes "podcast" RSS feed.
Level up your skills now!


Already subscribed? Sign In

Hide playlist

    Update state asynchronously in React using Promise and setState()

    In this lesson we will look at updating state in React based on the successful resolution of a promise making use of Promise.prototype.then. We will perform a user action such as clicking a button to delete an item and fire off a request to our API. Once our request is complete, we will update our component state based on current state using setState() with an updater function and remove the target item from the list with Array.prototype.filter.

    Please take a moment to tell your friends:

    You must be a PRO Member to view code