3min chapter

JavaScript Archives - Software Engineering Daily cover image

React Best Practices with Kent Dodds (Repeat)

JavaScript Archives - Software Engineering Daily

CHAPTER

Hook and Racks With the Suspense Moon

Suspense is actually a supported feature to day, and it's been around for over a year. Using those two together is what gets you all of these extra super powers. You can use suspense with class components just find there's really nothing about the two of em. The only relation that they have is that you can have a custom hook that is responsible for suspending component. But inside of your component, when before you return your j s x, while you are in that render phase, you create a promise which will be caught by react. So i get the similar response to when people see j s x for the first time. They're like, weight, that feels very wrong.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode