adspace


What a setState is doing?

Answer Posted / Jayveer Singh

`setState` is a method in React components used to update the component's state. It triggers a re-render of the component, which might result in changes visible on the screen. When using functions within `setState`, they will be executed with the most recent state at the time they are invoked.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you create higher order components (hocs) in react.js?

448


How to use events in reactjs? Give an example of using events?

565