Yesterday, I suggested naming functions passed to useEffect
Yesterday, I suggested naming functions passed to useEffect. A few people suggested just using a comment.
I disagree. Here's why.
Code > comment.
✅ Code tends to be kept updated, while comments often get stale. Thus, comments "lie" more often than code.
✅ Named functions…