Frontend Jul 15, 2019

Solving Real-Life Problems with React Suspense

reactweek.nyc @reactweek

Dustin Myers - Solving Real-Life Problems with React Suspense | React Week NY ‘19 As your user base grows, so do your ever-mounting UI needs/issues. One area that we try to provide a good experience to our users is in loading states. This gets very complicated very quickly, but React Suspense is here to save the day! In my talk, you will learn how React Suspense delays the rendering of a component if that component is fetching data, or even loading images! You will also get a glimpse of the under-the-hood magic of react-cache - the engine that allows Suspense to do this. We will build react-cache from scratch, and walk through each piece that makes React Suspense work. And it will only take 7 lines of code! We will then take things one step further. With the knowledge we gain about Suspense and react-cache, we will implement react-cache again to delay rendering until all of our images have finished loading. With React Suspense for data fetching, you will be able to provide a better experience for all of your users. No more spending a lot of time coming up with custom solutions for loading states in your software. React Suspense and react-cache give us everything we need to handle every situation with ease!

React Instructor at Lambda School by day and a photographer by night. Dustin loves the intersection of education and technology that his current position brings. He has worked on many projects and is constantly trying to find ways to help others learn and grow through his experience and knowledge. @dustint314