|
|
|
|
|
by steve_adams_86
2138 days ago
|
|
> 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. |
|