Комментарии:
Mind blowing learning
ОтветитьI am your fam
ОтветитьThanks for the amazing tutorial Reso. Great Work.
ОтветитьThanks! it helped me understand hooks a lot better than the other simple examples
ОтветитьGreat tutorial, really helpful. and i think we can dispose controllers inside our custom functional hooks as well using useEffect hooks' return method. no need to create hooks with classes :)
ОтветитьI wish they were a part of flutter because stateful widgets suck af
ОтветитьI just found this tutorial, thanks for making it. I would recommend keeping the 'super' calls (in init and dispose) as they are present in the super class (even if they are empty at the moment). In future versions, they may add some extra code here, which you will lose by not calling them, potentially breaking your app.
ОтветитьI will use hooks to death!
ОтветитьI understand the idea of using hooks in Flutter this way... however I feel I still don't really grasp the benefit of it:
in React Native, when you use the Hooks API, you don't really need a Hook class, it really is a function, seems to me like a lambda expression or an anonymous expression is being used.
If you need a Hook class, and extending the original Home stateful widget into a HookWidget... is it really a Hook?
I thought the idea behind Hooks was to avoid classes, but here we need to put those functions inside a class... Mmmmhhh.....
Thats awesome. I have a small question
I use multiple inheritedWidget for having one stateful core. And everything else is a const stateless widget.
If i convert some of my stateles widget to hookswidget... will the 'hooks' that i use be the same when the widget rebuilds? Or it does ignore lifecycles and use the same hook? 🤔🤔
This is why I felt in love with the react ecosystem, nice to see them here, on flutter :D
ОтветитьThank you, the only Flutter Hooks tutorial I managed to found in a whole Internet.
Need explanation about useState() and useEffect() hooks as well.
I think that in this particular case you could use a ready-made useScrollController() hook inside of your useScrollControllerForAnimation() method to not to turn it into class. But for learning purposes it's alright.
I just watched this video on Flutter Hooks and I have been watching your other tutorials with Blocs.
I'm thinking that Hooks can actually be used quite seamlessly with our BLoC logic as well too right? Let's say that certain apps need to do some actions for a "BLoC" hook if that BLoC hook is attached to the widget. What do you think? I would really like to hear your ideas on this!
I'd love to hear your (Reso Coder's) opinion on this vs. Blocs, since you generally promoted those in all your 2019 videos. To me, Hooks seem better/easier to use (yes, I come from the React world).
ОтветитьThank you for this detailed tutorial on hooks!
ОтветитьHow would you avoid the custom Scrollcontroller hook while still using the animation hook? Since you now inherit from HookWidget, there will be no dispose etc. (like you mentioned) so how is it possible to not abstract the Scrollcontroller away?
ОтветитьExcellent explanation!
ОтветитьGood tutorial, just as a side note, as the code is now, you have a memory leak if you do not dispose the controller for the animation. You seem to be disposing only the scrollcontroller inside the hook.
ОтветитьRecord more videos about MobX <3
ОтветитьCreate video about EvnetBus library. I had a problem few weeks ago with hiding bottom nav bar and app bar when user scrolls. I solve it with EventBus lib.
Ответитьthanks reso <3
ОтветитьVery useful tutorial , I cross GFW to watch your video ,keep it up~!
ОтветитьReally a great tutorial ✌️😎 Helpful !
ОтветитьVery good video ! What font are you using in VSCode ?
ОтветитьThis is awesome thanks
ОтветитьJust not a fan of react. I prefer Flutter’s (and by extension Dart’s) take on composition. What this really does is attempt to make an OOP framework functional. The term ‘hook’ is just a Trojan horse for a paradigm takeover.
ОтветитьYeah Yeah! Code reuse it the way to go :) Great video on creating a custom hook. Definitely will be using this in my tutorials / projects as well where I can. Thanks for the detailed video. Very helpful.
ОтветитьThat so cool! Hooks look awesome.
I also 100% agree with you, that if you only use it in one class, It's not a good idea to CREATE a hook just to use the hook in one widget, if one is already provided for you then that's awesome :D I'll probably start using this library just to take advantage of the useAnimationController hook!
I have a personal rule that I never create an abstraction before It becomes necessary. I always start with something that is as concrete as possible that's only used in one place with as little indirection as possible, and if the need arises I create an abstraction that are more versatile :D
You are the best
ОтветитьVery helpful! Best quality as usual... Keep it up!
Ответитьthank u :)
ОтветитьThis looks like similar to react hooks methodology.
ОтветитьReally useful tutorial. Thanks a lot!
ОтветитьIf we have a more interactive screen where variables are being set (StatefulWidget) with the hook being called from the build function as it is here it is going to be remade each time we setState(), right? But in this case could we call the hook in initState and use it as a container for our controllers? I can definitely see the benefit of containing the controllers this way because that code can overwhelm everything else.
ОтветитьVery usefull video. Thank you
ОтветитьFantastic Job ResoCoder
ОтветитьAs always quality tutorial.....please bro make a series on flutter + firebase.
Ответить