React Suspense Workshop 29 exercises
lesson

React Suspense Intro

Transcript

00:00 All right, I'm so excited to have you here to learn about React Suspense, all the asynchrony beauty that is React Suspense. It is really, really awesome. I love this API from React for managing data fetching and all of this. It's come a long way. We were in Suspense for a long time waiting for Suspense,

00:19 and now that it's here, I'm just so thrilled to use React Suspense. It's awesome. So yeah, we're going to be talking about data fetching, and actually, this one is super cool because we're going to be building our own version of what React does under the hood, so that you really have

00:36 a deep understanding of what's going on under the hood with React. Then we're going to talk about why there are some limitations with the way that React does asynchrony and how to get around those things. We're going to get into mutations and how to make changes and give the user a really awesome user experience,

00:53 even though we don't have control over the network, and how we can make their experience as awesome as possible. In fact, I wasn't going to show you this, but I decided I want to right now. Right here, there we go.

01:12 So I can choose a slow network connection, slow 3G. We're going to do the minor vessel, top speed of three, and here's our mining ship. Watch this. We're on a slow network. Hit create. Oh, boom. It's right there. All the data is right there.

01:30 It's so cool. I love it. It's created. Now we're loading. We have a message that we can show. It's all optimistic and awesome. I just think this is the coolest thing, and the API for this optimistic UI is quite good. So look forward to that. We're going to be loading images even.

01:49 Suspense isn't just about loading data. It's also about loading really any asynchronous thing. We're going to be optimizing our image loading so that it can coincide with the data in a nice way, and not make the user confused about which image they're looking at. We're going to make sure that things are responsive and

02:09 still suspenseful so I can look for things in this way, and look, it's all awesome and responsive. It's super cool with the use deferred value. Then we'll do a couple of optimizations to make the experience as awesome and fast as possible. So I'm excited for us to get into this.

02:28 I'm excited that you're here. So why don't we get started with data fetching? See you there.