in ReactJS by (1.4k points)

What is the lifecycle method getDerivedStateFromProps of React?

1 Answer

0 votes
by (1.4k points)

 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.

Related questions

0 votes
0 votes
0 votes
asked Jul 2, 2019 in ReactJS by Venkatshastri (1.4k points)
0 votes
...