State allows us to manage changing data in an application . It’s defined as an object where we define key-value pairs specifying various data we want to track in the application. In React, all the code we write is defined inside a component.5 Nis 2021
Why states are used in React?
State allows us to manage changing data in an application . It’s defined as an object where we define key-value pairs specifying various data we want to track in the application. In React, all the code we write is defined inside a component.5 Nis 2021