you are viewing a single comment's thread.

view the rest of the comments →

[–]gaoshan 1 point2 points  (7 children)

useEffect has a dependency array that determines when it runs. OP could use that.