Skip to content
JS

Use Suspense to Simplify Your Async UI

Course on egghead by Kent C. Dodds

View on egghead (opens in a new tab)
1 h 17 min
LengthVideo runtime
Subscription
Price modelegghead plan
15
Lessons
4.5
Rating out of 57 ratings on egghead
Dec 2019
Published5 Dec 2019

About this course

Description from egghead

🚧 SUSPENSE IS EXPERIMENTAL One of the biggest challenges to writing software for the web is dealing with asynchrony, but we have to deal with it all the time. This leads to a bunch of boilerplate code for handling loading and error states just to get the data we need to show the user-- whether the data comes from a remote endpoint or from browser APIs like geolocation and Bluetooth. The end result is countless spinners and the dreaded FOLC (flash of loading content). React Suspense is the answer to these problems. React Suspense is a primitive built-into React that drastically simplifies asynchronous state management in our applications, and helps you avoid FOLC out of the box. It's a bit of a different approach to managing these problems and understanding how it works is key to taking advantage of what it has to offer.

What it covers

15 lessons
  1. 1Course Intro
  2. 2Enable React Concurrent Mode
  3. 3Fetch Data with React Suspense
  4. 4Handle React Suspense Errors with an Error Boundary
  5. 5Write a generic React Suspense Resource factory
  6. 6Refactor data fetching with useEffect to Suspense Resources
  7. 7Where to Position React Suspense and Error Boundaries
  8. 8Cache React Suspense Resources
  9. 9Preload Images to Improve Loading Performance
  10. 10Create a Custom Suspending Image Component
  11. 11Implement the Fetch as you Render Approach for Improved Performance
  12. 12Create a Custom Hook that Creates Resources
  13. 13Use SuspenseList for Coordinating Suspending Components
  14. 14Fetch Modules Eagerly for SuspenseList
  15. 15Wrapping Up with Experimental React Suspense

Similar React courses

  1. Develop Accessible Web Apps with React

    egghead · Erin Doyle · 25 lessons · 4.5 from 31 ratings · Dec 2019

    1 h 21 minFree
    egghead254.5 (31)Dec 2019
  2. Build an App with React Suspense

    egghead · Michael Chan · 23 lessons · 4.5 from 15 ratings · Dec 2019

    1 h 24 minSubscription
    egghead234.5 (15)Dec 2019
  3. Build Your First React Website

    Coursera · Harrison Kong · Jun 2020

    Intermediate1 h 30 min
    CourseraJun 2020
  4. Intermediate1 h 30 min
    CourseraSept 2020
  5. Beautiful and Accessible Drag and Drop with react-beautiful-dnd

    egghead · Alex Reardon · 14 lessons · 4.8 from 30 ratings · Jul 2018

    1 h 3 minFree
    egghead144.8 (30)Jul 2018
  6. Learn React Router v5

    Codecademy · 1 lessons · Jan 2023

    Beginner1 h
    Codecademy1Jan 2023
  7. Beginner1 h
    Codecademy2Oct 2022
  8. Beginner1 h
    Codecademy1Oct 2022

A hyphen means the provider's catalogue does not state the value.

Same topic, nearest in length, up to three from any one provider.

Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.

    Compare