Y
Hacker News
new
|
ask
|
show
|
jobs
by
sktguha
2119 days ago
couldn't you just write the same function to handle the prop in both componentDidMount and componentDidUpdate ?
1 comments
ng12
2119 days ago
Sure, but you still have to know to do that and to do it correctly by checking whether the relevant values have changed in componentDidUpdate.
link