Q. Which React component lifecycle method is called before rendering?
β
Correct Answer: (D)
getDerivedStateFromProps
Explanation: getDerivedStateFromProps is called before render and helps update state based on props.