Revisited: setState()
In this chapter we revisit the React setState() method. We learn that setState() is asynchronous and not only takes objects as arguments but also takes functions.
We'll cover the following
setState()
can take functions as input
So far, we have used React setState()
to manage your internal component state. We can pass an object to the function where it updates partially the local state.
Get hands-on with 1400+ tech skills courses.