News for hackers. Stuff that matters.
Re:React is becoming a black box by sktguha on Thursday September 03, 2020 @03:30PM (#24367810)
couldn't you just write the same function to handle the prop in both componentDidMount and componentDidUpdate ?
Re:React is becoming a black box by ng12 on Thursday September 03, 2020 @05:55PM (#24369326)
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.