|
|
|
|
|
by dragonwriter
2017 days ago
|
|
> I'm not familiar with react hooks, but when I read what you write, my immediate reaction is: we already have a way to reuse business logic. It's called functions. Hooks are functions. If that wasn't obvious, it's also explicit called out as a key thing about them in the excerpt from the docs that you present and then try to make a point with that entirely ignores the content of the excerpt. |
|
Hooks are not _just_ functions, they are special functions where that (by the documentation) should not be called inside loops, conditions, or nested functions. These are severe restrictions compared to the "normal/pure" functions that I meant.