solidart_hooks 3.1.1
solidart_hooks: ^3.1.1 copied to clipboard
Flutter Hooks bindings for Solidart, suitable for ephemeral state and for writing less boilerplate.
3.1.0 #
Changes from solidart #
- REFACTOR: Deprecate
maybeOnandonmethods ofResourceState. UsemaybeWhenandwheninstead.
3.0.0 #
-
BREAKING CHANGE:
SignalHookno longer callssetStateto trigger a rebuild when the signal changes. Instead, you should useSignalBuilderto listen to signal changes and rebuild the UI accordingly. This change improves performance and reduces unnecessary rebuilds. You can also useuseListenableif you want to trigger a rebuild on signal changes.Migration Guide #
Before (v2.x):
final count = useSignal(0); return Text('Count: ${count.value}'); // Auto-rebuildsAfter (v3.x):
final count = useSignal(0); return SignalBuilder( builder: (context, child) => Text('Count: ${count.value}'), );Or use
useListenablefor full widget rebuild:final count = useSignal(0); useListenable(count); return Text('Count: ${count.value}');This is inline with the behaviour of
useValueNotifierfromflutter_hooks.
2.0.0 #
- FEAT: Added
useResource,useResourceStream,useListSignal,useSetSignalanduseMapSignalhooks. - CHORE: Export
flutter_solidartpackage.
1.0.0+1 #
- CHORE: Move example to
packages/solidart_hooks/exampleto be compatible with pub.flutter-io.cn requirements.
1.0.0 #
- Initial release of solidart Hooks.