arrow_backBACK TO DRILLS
Blue Beltuseeffect
Running an effect only once
A developer wants to send analytics only once when a component mounts, but the effect uses userId. Which approach best follows React’s dependency model?
A developer wants to send analytics only once when a component mounts, but the effect uses userId. Which approach best follows React’s dependency model?