Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sktguha
· 6y ago · 0 comments
couldn't you just write the same function to handle the prop in both componentDidMount and componentDidUpdate ?
Comments
[–]
ng12
6y 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.