Mobile | Sat Apr 09 20222,727 views

Suspense Example

Thumbnail

Hello my friend! 👋🏼

This is a Suspense example, which is a React feature that allows you to render a loading state while your component is loading.

About this app

This tutorial is perfect to get familiar with the Suspense feature using React Native since it seems like it's going to be a common feature in the future.

Dependencies

In this project we are using yarn

yarn add swr

To upgrade to the latest version of React, run the following command:

yarn add react react-dom

We use SWR to fetch data from the randomuser.me API.

Conclusion

As I said at the beginning, Suspense is a great feature and we as developers should get familiar with it.

Youtube GitHubDownload as Zip

Go back to Projects