in React JS by

What is the lifecycle method getDerivedStateFromProps of React?

▼ Show 1 Answer

0 votes

 Invoked right before calling render() and is invoked on every render. This exists for rare use cases where you need derived state. Worth reading if you need derived state.

React JS
Learn More with Madanswer

Related questions

0 votes
asked Jul 2, 2019 in React JS by Venkatshastri