Two main problems with this package: * this is React concept, it's not Flutter way; * it breaks the convention of build being a pure function free from side-effects. Again, author tries to hide some "complexity" of pretty important Flutter concept: stateless vs stateful widgets and their lifecycles, bringing more confusion and some pitfalls.
There's a reason React moved from class components (what Flutter has today) to hooks. And it looks like with static metaprogramming, Flutter will get hooks too in the future.
I am afraid that even after watching this video I still have no idea what hooks are... After reading some comments it seems that it makes sense only if you already have experience with React... But for those of us without experience with React, hooks are still a mystery after this video.
How to find out the effectiveness of this approach in practice? Does anyone have a performance comparison? I don't use dispose and my apps are working fine
Nah hooks are great because like he said I don't have to deal with initializing and disposing every time. Don't dismiss something just because it's used in some other library.
@@zzzyyyxxx hooks are awfully unreadable. I’d take a clear stateful approach with something like Bloc any day. Far easier to read, maintain, and trace where the logic is flowing rather than the magic boxes that React is bloated with.
@@stevenstone307 What do hooks have to do with global state management? I use Riverpod and they have an optional hooks package too, it works just fine. Talking about Bloc over hooks doesn't make any sense because they're not related, one is about encapsulating lifecycle actions and the other is global state management. Bloc even has an optional hooks package too if you want, so not sure what you're talking about.