-
Book Overview & Buying
-
Table Of Contents
React and React Native - Sixth Edition
By :
State represents the dynamic aspect of your React application. When the state changes, your components react to those changes. Without state, you would have nothing more than a fancy HTML template language. Usually, the time required to perform a state update and have the changes rendered on the screen is barely, if at all, noticeable. However, there are times when complex state changes can lead to noticeable lag for your users. The goal of this chapter is to address these cases and find out how we can avoid those lags.
In this chapter, you will start by learning how to batch state changes together to minimize unnecessary re-rendering. You will then explore how to prioritize state updates so that content critical to the user experience is rendered first. Finally, you will learn how to develop strategies for performing asynchronous actions while effectively batching and prioritizing state updates.
As such, we will cover the following main topics: