flutter_hooks 0.10.0-dev+2 copy "flutter_hooks: ^0.10.0-dev+2" to clipboard
flutter_hooks: ^0.10.0-dev+2 copied to clipboard

outdated

A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse.

0.10.0 #

Breaking change:

  • The order in which hooks are disposed has been reversed.

    Consider:

    useSomething();
    useSomethingElse();
    

    Before, the useSomething was disposed before useSomethingElse. Now, useSomethingElse is disposed before the useSomething.

    The reason for this change is for cases like:

    // Creates an AnimationController
    final animationController = useAnimationController();
    // Immediatly listen to the AnimationController
    useListenable(animationController);
    

    Before, when the widget was disposed, this caused an exception as useListenable unsubscribed to the AnimationController after its dispose method was called.

Non-breaking changes:

  • Added a way for hooks to potentially abort a widget rebuild.
  • Added StatefulHookWidget, a StatefulWidget that can use hooks inside its build method.

0.9.0 #

  • Added a deactivate life-cycle to HookState

0.8.0+1 #

  • Fixed link to "Existing hooks" in README.md.

0.8.0: #

Added useFocusNode

0.7.0: #

  • Added useTextEditingController, thanks to simolus3!

0.6.1: #

  • Added useReassemble hook, thanks to @SahandAkbarzadeh

0.6.0: #

  • Make hooks compatible with newer flutter stable version 1.7.8-hotfix.2.

0.4.0: #

0.3.0: #

  • NEW: usePrevious, a hook that returns the previous argument is received.
  • NEW: it is now impossible to call inheritFromWidgetOfExactType inside initHook of hooks. This forces authors to handle value updates.
  • FIX: use List
2.24k
likes
0
points
692k
downloads

Publisher

verified publisherdash-overflow.net

Weekly Downloads

A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_hooks