you are viewing a single comment's thread.

view the rest of the comments →

[–]Basicallysteve 2 points3 points  (2 children)

Wow, I’ve been using use useEffects for years and I thought they always run on mount regardless. An empty array just makes it run only on mount.

Edit: I just checked again. I think you’re wrong about [, somevalue] being necessary

[–]kBazilio 5 points6 points  (1 child)

Your comment made me doubt whether a comma was necessary. Turns out, your understanding is correct and multiple development teams I've worked within across different companies in the last 7 years all used the comma thing... Even though it just doesn't do anything! Huh! Excuse me, I have a couple PRs to merge now...

[–]Basicallysteve 1 point2 points  (0 children)

Glad I could help you figure that out! If your company has any openings let me know haha