3 Managing state in react.js (test)
⇦ Back to lesson
Question 4
What role do lifecycle methods play in managing state in React components, and give an example of a lifecycle method that can be used for state management?