In this video, we learn about the ReactJS setState() method. A state in React dictates and controls the behaviour of a component. In a nutshell, the state ensures that all updation made by the user or the kernel is visible on the application. In this video, we see what a React state is, and the setState() method. A demo showcasing the working of the state is shown for a better understanding.

Below are the topics covered in this video:

  • 0:00 - React setState()
  • 0:32 - What is a state in React?
  • 1:16 - ReactJS state demo
  • 5:56 - setState method in React
  • 6:24 - setState demo

What is ReactJS?
React JS is an open-source JavaScript library that helps in building dynamic user interfaces for one-page applications. It handles the view layer for web and mobile apps and also allows developers to create reusable UI components. React is the most popular front-end JavaScript library in the field of web development. It is used by large, established companies and newly-minted startups alike (Netflix, Airbnb, Instagram, and the New York Times, to name a few). React brings many advantages to the table, making it a better choice than other frameworks like Angular.js.

What is ReactJS State?
A state is an object that stores the values of properties belonging to a component that could change over a period of time.

#react #reactjs #javascript

setState() Method In React | How setState() Works? | ReactJS Tutorial For Beginners
1.75 GEEK