jolt_setup 3.2.0-dev.0
jolt_setup: ^3.2.0-dev.0 copied to clipboard
Setup Widget API and Flutter hooks for building reactive widgets with Jolt signals, featuring automatic resource cleanup and lifecycle management.
3.2.0-dev.0 #
useReset Hook #
The useReset hook provides a runtime mechanism to reset and re-run the setup function, similar to hot reload but triggered programmatically. This is useful when you need to completely reinitialize all hooks and state in response to external changes.
Why is it needed?
In some scenarios, you may need to completely reset the widget's setup rather than just updating individual hooks:
- External state changes: When external state (like a global configuration or theme) changes, you may want to reinitialize all hooks with the new state
- Dynamic reconfiguration: When the widget needs to be reconfigured based on runtime conditions
- State synchronization: When you need to ensure all hooks are recreated to match a new state snapshot
Usage:
The useReset hook provides four methods: useReset() for manual reset, useReset.listen() to listen to Listenable changes, useReset.watch() to watch reactive signal changes, and useReset.select() to watch selected value changes.
When reset is triggered, the setup function is completely re-run:
- All existing hooks are unmounted in reverse order
- All effects and cleanup functions are disposed
- All hook state is cleared
- The setup function is re-executed to create new hooks
- New hooks are mounted
This ensures a clean slate for the widget's reactive state.
3.1.0 #
2.1.0 #
2.0.0 #
- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
2.0.0-beta.6 #
2.0.0-beta.5 #
2.0.0-beta.4 #
Note: This release has breaking changes.
- BREAKING FEAT(jolt_flutter): add SetupMixin. (50487f6c)
2.0.0-beta.3 #
2.0.0-beta.2 #
2.0.0-beta.1 #
New features:
-
New library:
- Added
setup.dartlibrary, exportingSetupWidget,SetupBuilder, and corresponding hooks
- Added
-
REFACTOR: rename setup widget. (c7f5fb71)
-
REFACTOR: extract hooks into separate jolt_flutter_hooks package. (e12adb35)
-
REFACTOR(setup): improve reactive tracking. (70bffa24)
-
REFACTOR(setup): consolidate hooks exports. (4f4dcf70)
-
REFACTOR(core): optimize reactive system core and improve code quality. (444957b6)
-
REFACTOR: restructure core interfaces and implementation classes. (e552ab33)
-
FEAT: implement Setup Widget with type-based hook hot reload. (e71cf18c)
-
FEAT: add onChangedDependencies() hook. (00a540bf)
-
DOCS(jolt_flutter): update api documents. (48b51351)
1.1.2 #
- Update a dependency to the latest release.
1.1.1 #
- REFACTOR(jolt_flutter): optimize widgets dependency tracking and rebuild logic for better performance. (52ebbeee)
1.0.0 #
Note: This release has breaking changes.
- REFACTOR: simplify EffectScope API, add detach parameter. (eed8cc1a)
- FIX(jolt_flutter): remove redundant dependency. (942c61a2)
- FEAT(jolt): allow watcher to receive null as old value when called immediately. (b101c68e)
- DOCS: improve code documentation. (c152870a)
- BREAKING REFACTOR: remove JoltResource, add JoltProvider, refactor JoltSelector. (a91e0860)
0.0.7 #
- chore: update dependencies
0.0.6 #
- chore: use
melosfor monorepo management - feat: add mutual conversion between
ValueListenable/ValueNotifierandsignal
0.0.5 #
- docs: update README
- chore: bump minimum required jolt version to 0.0.5
0.0.4 #
- chore: update dependencies
0.0.3+1 #
- fix: effect scope context
0.0.3 #
- chore: update dependencies
0.0.2+1 #
- fix: some bugs
- refactor: value notifier extension
0.0.2 #
- Initial version.