News for hackers. Stuff that matters.
Re:React v17.0 Release Candidate: No New Features by steve_adams_86 on Saturday August 15, 2020 @10:51AM (#24169286)
> empty arrays to designate behaviour that isn't obvious

This drives me a little crazy too. That behaviour can be easily documented by wrapping it in a function with a name that makes sense, but people litter their React code with non-obvious hooks everywhere. You can reduce a lot of boilerplate (why are you writing empty arrays everywhere!?) and improve readability substantially by wrapping the hooks in more composed and idiomatic functions.

I think that was along the lines of what was intended for hooks, but I don't see it often.

There are no comments on this comment yet.