React TutorialLesson 37Free preview
React Suspense
This lesson is part of React · All levels
Summary
React.Suspense displays temporary fallback when the components in it are not ready, for example when a file is being loaded. You wrap the part with Suspense and then render the components through dynamic import. Users also see the load indicator instead of the blank screen.
Key points
- Fallback is a temporary display while waiting
- Working with dynamic
- Pack the unfinished parts with the Suspense component
- Fallback should be a spinner or a clear skeleton.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.