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

    Handle a rejected promise and display error to user using setState()

    In this lesson we will account for errors encountered during a failed requests and display a helpful error message to the user. We will add a catch() handler (Promise.prototype.catch) to our request's promise where we will add an error message to component state and set our loading state to false. We'll add an error message to our app that will only display once an error has occurred using conditional rendering.

    Please take a moment to tell your friends:

    You must be a PRO Member to view code