DEV Community

Discussion on: React Hooks: useEffect

Collapse
 
hajarnasr profile image
Hajar | هاجر • Edited

Yeah, I didn't use an example to answer that question (sorry). However, I think what I wanted to say was that if we wanted to add some code that depended on the component's render, useEffect would be the right place to add that code. Because it gets called after all the elements are painted on the page. :)