DEV Community

loading...

Discussion on: React Hooks in 5 Minutes

Collapse
ptejada profile image
Pablo Tejada

I think using an empty array looks cleaner and more readable.

Thread Thread
jh3y profile image
Jhey Tompkins Author

Yeah, definitely 👍 But it seems to be discouraged if the effect in question makes use of props + state in the component's scope.