Google News
logo
ReactJS - Quiz(MCQ)
Why is it important to avoid copying the values of props into a component's state where possible?
A)
because you should never mutate state
B)
because you want to allow data to flow back up to the parent
C)
because getDerivedStateFromProps() is an unsafe method to use
D)
because you want to allow a component to update in response to changes in the props 

Correct Answer :   because you want to allow a component to update in response to changes in the props