Custom Hook code runs during component rendering, so it should avoid side effects in the render path and put external synchronization in Effects or event handlers.
Question 13 of 20 in Custom Hooks Quiz