Hacker News new | past | comments | ask | show | jobs | submit login

couldn't you just write the same function to handle the prop in both componentDidMount and componentDidUpdate ?



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: