Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In React, you know for sure that if your reference changes, the component reading that reference as a prop will re-render.

Amen. Data flows down. That, to me, is one of React's biggest strengths.



Amen because of this we have useeffect and calling the whole component tree on a isloading change


isLoading should be a boolean; it will maintain referential equality across renders and not cause a re-render unless it is an actual edge from false to true or vice versa.


what? what does what you said have anything to do with what I said? how does "data flowing down" now related to the use effect dependency cycle? are you new to programming?




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

Search: