flutter_reactter 8.0.0
flutter_reactter: ^8.0.0 copied to clipboard
A light, powerful and quick Reactive State Management, Dependency Injection and Event Handler.
Reactter #
8.0.0 #
Enhancements #
- Add Reactter devtools extension.
- Add
Rt.addObserverandRt.removeObservermethods to manage the observers. - Add
RtStateObserverclass to monitor the lifecycle of state(onStateCreated,onStateBound,onStateUnbound,onStateUpdatedandonStateDisposed). - Add
RtDependencyObserverclass to monitor the lifecycle of dependency(onDependencyRegistered,onDependencyCreated,onDependencyMounted,onDependencyUnmounted,onDependencyDeleted,onDependencyUnregisteredandonDependencyFailed). - Add
Rt.initializeLoggerto initialize the Reactter logger. - Add
Rt.initializeDevToolsto initialize the devtools for observing the states and dependencies. - Add
debugLabelanddebugInfoto states and hooks to get info for debugging. - Add
RtContextMixinmixin to provide access to theRtinstance. - Add
RtStateabstract class to implement the base logic of the state. - Add
Rt.registerStatemethod to create a new state. - Add
Rt.getRefAtto get the reference of dependency created. - Add
initHookmethod toRtHookto call when hook is created. - Add
cancelmethod toUseAsyncStateto cancel current method. - Update
batchanduntrackedmethods to support asynchronous callbacks. - Enhance event handling and notifier logic for improved stability and performance.
- Enhance state management and error handling.
- Add dependency
modetoRtComponent. - Enhance dependency management to ensure to re-build when is detected changes while building.
Breakings #
- Remove
Reactter, useRtinstead. - Remove
ReactterStateImplandRtStateImpl, useRtStateinstead. - Replace
UseAsyncStateStatus.standbytoUseAsyncStateStatus.idle. - Rename
DispatchEffecttoAutoDispatchEffect. - Move
asyncFunctionto the first parameter ofUseAsyncStateandUseAsyncState.withArg. - Remove
Rt.isRegistered, useRt.isActiveinstead. - Remove
Rt.getInstanceManageMode, useRt.getDependencyModeinstead. - Remove
InstanceManageMode, useDependencyModeinstead. - Remove
Lifecycle.initialized, useLifecycle.createdinstead. - Remove
Lifecycle.destroyed, useLifecycle.deletedinstead. - Replace
LifecycleObservertoRtDependencyLifecycle. - Remove
LifecycleObserver.onInitialized, useRtDependencyLifecycle.onCreatedinstead. - Remove
ReactterInstanceandReactterDependency, useRtDependencyinstead. - Remove
ReactterHook, useRtHookinstead. - Remove
ReactterInterface, useRtInterfaceinstead. - Remove
RtState.refresh, useRtState.notifyinstead. - Remove
UseInstance, useUseDependencyinstead. - Remove
ReactterAction, useRtActioninstead. - Remove
ReactterActionCallable, useRtActionCallableinstead. - Remove
MemoInterceptors, useMultiMemoInterceptorinstead. - Remove
AsyncMemoSafe, useMemoSafeAsyncInterceptorinstead. - Remove
TemporaryCacheMemo, useMemoTemporaryCacheInterceptorinstead. - Remove
MemoInterceptorWrapper, useMemoWrapperInterceptorinstead. - Remove
Obj. - Remove
initproperty fromRtProvider, useRtProvider.initinstead. - Remove
ReactterComponent, useRtComponentinstead. - Remove
ReactterConsumer, useRtConsumerinstead. - Remove
ReactterProvider, useRtProviderinstead. - Remove
ReactterProviders, useRtMultiProviderinstead. - Remove
ReactterScope, useRtScopeinstead. - Remove
ReactterWatcher, useRtSignalWatcherinstead. - Remove
ReactterDependencyNotFoundException, useRtDependencyNotFoundExceptioninstead. - Remove
ReactterScopeNotFoundException, useRtScopeNotFoundExceptioninstead.
Fixes #
- Fix bug in
UseEffectcausing dependencies to not be unwatched. - Fix to show the correct dependency mode in the logger of the
Rt.registermethod. - Fix nested
Rt.batchmethod to work correctly. - Add error handling listeners and continue to next listeners in
Notifierclass. - Fix to propagate state param to
boundInstance. - Remove listeners correctly from single-use listeners and handle null cases.
Internal #
- Add
StateObservertest. - Rename some variables to use consistent naming convention.
- Update
UseDependencyto support id parameter in tests. - Update annotated markdown references for clarity.
- Add Reactter devtools extension and configuration files.
- Rearrange arguments in
UseAsyncStateconstructor. - Simplify the
UseReducerimplementation. - Add observer support for nested state updates.
- Allow communication between application and devtools extension.
- Add
IContextinterface class to represent the current context what the application is running in. - Replace
StateBasetoRtStateinterface. - Separate logic of
EventNotifiertoNotifierclass. - Restructure the framework and core classes.
- Update
RtWatcherto extendRtScopeand refactor code. - Update examples to use new features.
- Improve dispose logic in
RtStateandUseDependency. - Update hook registration and state attachment logic.
- Improve
nulllistener handling inNotifierclass. - Improve dispose, register and notify logic of state.
- Support asynchronous callbacks in untracked and batch methods and add test for it.
- Simplify dependency listener callbacks and improve state management checks.
- Clean up exports, remove deprecated code, and improve event handling.
- Add tests for dependency state watching and useEffect disposal.
- Update exports to improve clarity and remove hidden types.
- Enhance autoBinding method to accept an optional bound instance; improve state binding logic.
- Enhance test coverage by adding error handling, debug label, and debug info tests for various components.
- Update dependencies and version for reactter package.
- Improve test command for better coverage.
- Update dependency references to use objects instead of hashcodes.
- Update mount and unmount logic in
ProviderElement. - Add constants for release, profile, debug, web modes.
- Update dependency handling and improve widget lifecycle management.
- Enhance provider and scope implementations with improved type safety and instance management.
7.3.0 #
Breakings #
- refactor(core, test): Deprecate
isRegisteredmethod and replace it withisActiveto use a right concept.- Deprecated
Rt.isRegistered, useRt.isActiveinstead.
- Deprecated
- refactor: Deprecate
Objclass, and extension methodstoSignalandtoObj. - refactor: Update references to use
Rtinstead ofReactter. - refactor: Update references to use
RtStateinstead ofReactterState.- Deprecate
ReactterState, useRtStateinstead. - Deprecate
ReactterStateImpl, useRtStateImplinstead.
- Deprecate
- refactor: Update references to use
RtHookinstead ofReactterHook.- Deprecate
ReactterHook, useRtHookinstead.
- Deprecate
- refactor: Update references to use
RtDependencyinstead ofReactterDependency.- Deprecate
ReactterDependency, useRtDependencyinstead. - Deprecate
ReactterDependencyNotFoundException, useRtDependencyNotFoundExceptioninstead.
- Deprecate
- refactor: Update references to use
RtActioninstead ofReactterActionandRtActionCallableinstead ofReactterActionCallable.- Deprecate
ReactterAction, useRtActioninstead. - Deprecate
ReactterActionCallable, useRtActionCallableinstead.
- Deprecate
- refactor: Update memo interceptors to use more descriptive names.
- Deprecate
MemoInterceptors, useMultiMemoInterceptorinstead. - Deprecate
AsyncMemoSafe, useMemoSafeAsyncInterceptorinstead. - Deprecate
TemporaryCacheMemo, useMemoTemporaryCacheInterceptorinstead. - Deprecate
MemoInterceptorWrapper, useMemoWrapperInterceptorinstead.
- Deprecate
- refactor: Update widget references to use
RtSignalWatcherinstead ofReactterWatcher.- Deprecate
ReactterWatcher, useRtSignalWatcherinstead.
- Deprecate
- refactor: Update references to use
RtSelectorinstead ofReactterSelector.- Deprecate
ReactterSelector, useRtSelectorinstead.
- Deprecate
- refactor: Update references to use
RtScopeinstead ofReactterScope.- Deprecate
ReactterScope, useRtScopeinstead. - Deprecate
ReactterScopeNotFoundException, useRtScopeNotFoundExceptioninstead.
- Deprecate
- refactor: Update references to use
RtMultiProviderinstead ofReactterProviders.- Deprecate
ReactterProviders, useRtMultiProviderinstead.
- Deprecate
- refactor: Update references to use
RtProviderinstead ofReactterProvider.- Deprecated
ReactterProvider, useRtProviderinstead.
- Deprecated
- refactor: Update references to use
RtConsumerinstead ofReactterConsumer.- Deprecate
ReactterConsumer, useRtConsumerinstead.
- Deprecate
- refactor: Update references to use
RtComponentinstead ofReactterComponent.- Deprecate
ReactterComponent, useRtComponentinstead.
- Deprecate
Enhancements #
- feat(extensions): Add
idparameter towatchmethod. - feat(widgets): Add the
RtWatcherwidget. It's a experimental widget for watching state and rebuilding when the state watched changes.
Fixes #
- refactor: Remove unused
idparameter inProvideImplandRtScope.contextOf.
Internal #
- refactor: Rename files and classes to use consistent naming convention.
7.2.0 #
Breakings #
- refactor(core,hooks,test): Deprecate and replace some enums and methods on Lifecycle to use the right concept.
- Deprecated
Lifecycle.initialized, useLifecycle.createdinstead. - Deprecated
Lifecycle.destroyed, useLifecycle.deletedinstead. - Deprecated
onInitializedmethod ofLifecycleObserver, useonCreatedmethod instead. - Deprecated
onDestroyedmethod ofLifecycleObserver, useonDeletedmethod instead.
- Deprecated
- refactor(widgets): Update
ReactterProviderto useReactterProvider.initconstructor instead ofinitproperty.- Deprecated
initproperty ofReactterProvider, useReactterProvider.initinstead.
- Deprecated
Enhancements #
- feat(core): Add
Reactter.hasRegistermethod to check if the dependency is registered in Reactter. - refactor(framework): Improve lazy loading performance in
ProviderImpl, update implementation to reduce unnecessary checks and streamline widget rendering.
Fixes #
- fix(core): Prevent all
ReactterDependencyevents from being deleted after deregistering a dependency.- Update
offAllmethod inEventHandlerto support generic removal.
- Update
- fix(hooks): Ensure that the callback is executed by the
dependenciesofUseEffect. - refactor(hooks): Improve error handling in
UseEffect.
Internal #
- refactor(core,framework,hooks): Update
dependencyInjectiongetter names in Reactter codebase. - refactor(framework,test): Rename
reactter_instancetoreactter_dependencyand fix imports and exports. - doc(hooks): Update
UseReducerandUseStatedocumentation to improve clarity and consistency. - test(core,hooks): Rename some files and update the descriptions.
- test(core): Add
Reactter.hasRegistertest. - refactor: Remove unnecessary 'late' modifier in
TestController. - test: Add comparable test cases for
Args. - refactor: π Improve some comments and documentation for clarity and consistency.
- test: π Update the descriptions of some test for clarity and consistency.
- test(widgets): Add test case for nullish dependency obtained from context.
- test(widgets): Add test case for getting dependency form
ReactterProvidersiblings. - refactor: Resolve lints and formatting issues.
7.1.0 #
Breakings #
- refactor(core,framework,hooks,test): Deprecate and replace some classes and methods to use the right concept.
- Deprecated
UseInstancehook, useUseDependencyhook instead. - Deprecated
InstanceManageModeenum, useDependencyModeenum instead. - Deprecated
ReactterInstanceclass, useReactterDependencyclass instead. - Deprecated
getInstanceManageModemethod, usegetDependencyModemethod instead.
- Deprecated
Internal #
- refactor(core,framework,hooks,test): Deprecate and replace some classes and methods to use the right concept.
- Renamed
InstanceManagerclass toDependencyInjection. - Renamed
EventManagerclass toEventHandler. - Renamed
StateManagerclass toStateManagement.
- Renamed
7.0.1 #
Internal #
- test: Refactor and structure examples.
- doc: Update
ReactterWatcherbuilder comments for clarity.
7.0.0 #
Enhancements #
- feat(core, framework): Add
Reactter.batchandReactter.untrackedmethods.Reactter.batchhepls to execute the givencallbackfunction within a batch operation. A batch operation allows multiple state changes to be grouped together, ensuring that any associated side effects are only triggered once, improving performance and reducing unnecessary re-renders.Reactter.untrackedhepls to execute the givencallbackfunction without tracking any state changes. This means that any state changes that occur inside thecallbackfunction will not trigger any side effects.
- refactor(framework): Refactor lifecycle event handling and add lifecycle observer interface.
- Add
LifecycleObserverinteface for event handling of the instance. - Add
didUnmountlifecycle.
- Add
- refactor(core, framework, types): Add
LogLevelenum and updatedefaultLogWriterCallbacksignature. - refactor(hooks): Improve
UseEffectperformance and readability.- Add
UseEffect.runOnInitconstructor to execute callback effect on initialization.
- Add
- feat(framework, widgets): Add
ReactterProvider.lazyconstructor for lazy instance initialization. - refactor(widgets): Add
idproperty toReactterComponentfor debugging information.
Breakings #
- refactor(extensions, hooks, objs, signals): Remove features deprecated.
- Remove
List<ReactterState>.when, usecontext.selectorUseComputeinstead. - Remove
UseContext, useUseInstanceinstead. - Remove
UseEvent, use event shortcuts instead. - Remove
initialStateandresetfromUseState. - Remove
.obj, useObjclass instead. - Remove
.signal, useSignalclass instead.
- Remove
- refactor(framework, widgets, test): Change the position of
InstanceContextBuilder(InstanceChildBuildernow) arguments.- Move
contextto first argument onInstanceContextBuilder(InstanceChildBuildernow). - Adapt the
InstanceContextBuilder(InstanceChildBuildernow) ofReactterComponent,ReactterConsumerandReactterProviderwidgets.
- Move
- refactor(core, hooks): Rename
attachTotobind,detachInstancetounbindandinstanceAttachedtoinstanceBinded. - refactor(hooks): Improve
UseEffectperformance and readability.
Fixes #
- fix(obj): Fix equality comparison in
ObjBaseclass. - fix(core): Resolve event for both types(instanceRef, instanceObj) and log event error.
- fix(core): Find the instance registered by the instance manager when searching for the extended class.
- refactor(core): Fix out-of-bounds index on
getHashCodeRefAtmethod.
Internal #
- refactor(framework, widgets, test): Change the position of
InstanceContextBuilder(InstanceChildBuildernow) arguments.- Adjust the tests about
ReactterComponent,ReactterConsumerandReactterProviderwidgets. - Adjust the documentation about
ReactterComponent,ReactterConsumerandReactterProviderwidgets.
- Adjust the tests about
- refactor(framework, widgets, test): Improve framework structure and simplify the
ReactterProvidercode.- Remove
Reactterprefix of the framework classes. - Add
ProviderBase,ProviderImpl,ProviderElementandProviderRefclass. - Rename
InstanceContextBuildertoInstanceChildBuilderandInstanceValueBuildertoInstanceValueChildBuilder. - Add
ChildBuildertype. - Add
Reactter.getHashCodeRefmethod.
- Remove
- refactor: Refactor file structure and imports.
- refactor(core, framework, hooks, signal): Rename variables of
ReactterZoneand improveReactterStateimplementation. - refactor(test): Add
lazyState,untrackedandbatchtests. - refactor(core, test): Fix lifecycle event handling and add lifecycle_observer test.
- refactor(core, framework, test): Refactor event manager and remove unused code for 100% coverage.
- refactor(core, framework): Add
BindingZoneclass and update references. - fix(core): Fix generic type constraint in
_getInstanceRefmethod. - refactor(core): Refactor event handling logic and optimize listener removal.
- test(core, hooks): Add tests for signal usage on instance and binding to another instance.
- test(widgets): Add
ReactterProvider.lazytests, updateReactterComponenttests and addLifecycleObservertoTestController. - fix(example): Update dependencies and fix code formatting on examples.
6.2.0 #
6.1.0 #
Enhancements #
- feat(framework, widgets, extensions): Add
ReactterSelectorwidget andcontext.selectmethod extension.ReactterSelectorandcontext.selecthelp to control the rebuilding of widget tree using aSelectormethods that allows to select a state specific for listening, and return a computed value.
- feat(widgets): Add
ReactterScopeWidget. IfReactterProvider.contextOfdoesn't have a type defined, useReactterScopeto work correctly.
Breakings #
- perf(framework): Remove
updateAsyncfromReactterHookandReactterState. - perf(framework): Remove
emitAsyncfromReactterEventManager. - refactor(extensions): Deprecate
List<ReactterState>.when, usecontext.selectorUseComputeinstead.
Fixes #
- fix(widgets): Notify
ReactterWatcherhas changed when available. - fix(framework): Remove
UseWenasynchronously when callmarkNeedsNotifyDependentsthrough its changes.
Internal #
- perf(framework): Add
ReactterNotifierto manage events. - refactor(widgets): Improve
ReactterProvidercode. - perf(extensions, framework, widgets): Improve performance of
context.watch. - refactor(types): Add
WatchStateandSelectComputeValuetypes. - refactor(framework): Improve message error about
notifyListenersofReactterNotifier. - feat(framework, widgets, extensions): Improve managing dependency.
- test(framework, widgets, hooks): Fix some part for test coverage.
- test: Add
context.selectandReactterSelectortest. - doc: Fix some code documentation.
- refactor(example): Improve api example.
- doc: Add documention about new features.
6.0.0 #
Enhancements #
- feat(args): Implement generic arguments.
- Add the
Argsclass which represent one or more arguments. - Add the
Args1,Args2andArgs3classes which represent one, two and three arguments respectively. - Add the types
ArgsX2andArgsX3which representArgs2andArgs3with the same arguments type. - Add
arymethods for converting Function to Function with generic arguments.
- Add the
- feat(memo): Implement the
Memoclass. It's used for memoizing values returned by a calcutate function. - feat(memo): Add
MemoInterceptors,MemoInterceptorandMemoInterceptorWrapperfor intercepting and handling various events during the memoization process. - feat(memo): Add
AsyncMemoSafefor removing the memoized value if its futures that throw an error when executed. - feat(memo): Add
TemporaryCacheMemofor removing memoized values from the cache after a specified duration. - feat(framework, widgets):Improve
ReactterInstanceManagerandReactterInstance.- Add
refparameter toReactter.get. - Add
Reactter.destory. - Add
InstanceManageMode.builder,InstanceManageMode.factoryandInstanceManageMode.singletonenums. These types represent different ways of creating and managing instances. - Add
Reactter.getInstanceManageModemethod for getting the instance type of the instance specified. - Add
Reactter.isRegisteredmethod for check if an instance is registered in Reactter. - Add
Reactter.lazyBuilder,Reactter.lazyFactory,Reactter.lazySingletonmethods to register a builder function to create a new instance in one of the different types. - Add
Reactter.builder,Reactter.factory,Reactter.singletonmethods to create a new instance in one of the different types. - Add
typeproperty toReactterProvider.
- Add
- feat(hooks): Improve
UseInstancehook.- Add
UseInstance.registerconstructor for registering the builder function when it instantiated. - Add
UseInstance.createconstructor to create an instancia when it instantiated. - Add
UseInstance.getconstructor to create and/or get an instancia when it instantiated. - Add
UseInstance.lazyBuilder,UseInstance.lazyFactory,UseInstance.lazySingletonfactories to register a builder function to create a new instance in one of the different types when it instantiated. - Add
UseInstance.builder,UseInstance.factory,UseInstance.singletonfactories to create a new instance in one of the different types when it instantiated.
- Add
Breakings #
- refactor(framework): Replace
Reactter.instanceOftoReactter.find. - refactor(framework): Change builder parameter of
Reactter.registerandReactter.createto positional parameter. - refactor(hooks): Add
UseAsyncState.withArgfor usingUseAsyncStatewithArgs.- Now, the
resolvemethod ofUseAsyncStateis used without arguments. Replace withUseAsyncState.withArg. Itsresolvemethod allows to use arguments.
- Now, the
- refactor(hooks, example): Deprecate
UseState.initialandUseState.reset.- Avoid using it.
- refactor(hooks): Deprecate
UseEventhook.- Use event shortcuts instead.
- refactor(hooks, test): Deprecate
UseContexthook.- Use manage instances shortcuts or
UseInstanceinstead.
- Use manage instances shortcuts or
- refactor(framework): The
Reactter.unregistercouldn't deregister the instance builder when the instance is active. - refactor(framework): Rename
Reactter.disposetoReactter.offAll. - refactor(types): Rename
ContextBuildertoInstanceBuilderandInstanceBuildertoInstanceContextBuilder. - reactor(framework): Rename
Reactter.lazytoReactter.lazyState.
Internal #
- refactor(framework, hooks, test): Improve code structure and how to attach an instance to states using
ReactterZoneand structure code ofReactterState. - refactor(example): Improve examples using the new features.
- test(framework, widgets, hooks): Add some tests about
ReactterInstanceManager,ReactterInstance,UseInstance - test(framework): Improve tests.
- test(framework): Add
Reactter.destroytest. - test(memo): Add
MemoandMemoInterceptortest. - test(args): Add
Argstest. - test(hooks): Add
UseAsyncState.withArgtest. - test(hooks): Add
UseInstancetest. - fix(test): Fix grammar of test description.
5.1.2 #
5.1.0 #
Enhancements #
- feat(framework): Implement hook register.
- Add hook register logic for attaching
ReactterStatedefined intoReactterHook. - Refactor hooks to implement hook register.
- Add hook register logic for attaching
- feat(framework): Add
lazymethod and makeisInstanceBuildingvariable as public. - feat(extensions): Add
ReactterStateListExtensionwithwhenmethod. - feat(hooks): Add
UseComputehook. - feat(widget, test): Add
ReactterConsumerwidget.
Internal #
- build(example): Use
reactter_lint. - build(widgets): Remove unnecesary import.
- doc: Fix
ReactterInstanceNotFoundExceptiondocumentation. - refactor(framework): Export
ReactterInstance. - doc(example): Add and remove some concepts from main.
- refactor(example): Remove late keyword form some hooks.
- refactor(example): Implement play and stop animation.
- refactor(framework): Rename
_RegisterHooktoHookRegister. - test: Add
ReactterStateListExtensiontest and other adjustments. - refactor(widgets): Make
ReactterConsumer.builderrequired. - fix(framework): Add instance attached validation before
UseComputeis disposed. - refactor(extensions): Use
UseComputetype onwhenmethod. - test: Add
UseComputetest and other adjustments. - build(example): Change folder structure.
- build: Change folder structure for
flutter_reactterpackage.- Move all files to
src. - Rename
ReactterTypestotypes. enginewas separated intoextensions,frameworkandtypes.- Change folder structure of
test.
- Move all files to
- build: Change folder structure for
reactterpackage.- Move all files to
src. - Rename
ReactterTypestotypes. corewas separated intoframework,objs,signals,lifecycle,types.- Change folder structure of
test.
- Move all files to
- refactor(core, widgets): Implement Reactter event to Signal generic.
- Remove
ReactterSignalProxy. - Move
Obj,Signalto other folder. - Refactor
ReactterWatcherto the new changes.
- Remove
- refactor(core): Remove
ReactterNotifyManager.ReactterNotifyManageris no longer used, all its methods were moved toReactterState.Lifecycleenum was move to new file(lifecycle.dart).
5.0.1 #
Internal #
- fix(test): Change dependencies for test coverage.
- fix(test): Fix some info about code validator.
5.0.0 #
Breakings #
- refactor(engine, widgets, core, hooks, test): Delete
ReactterContextandReactterHookManagerand remove all about it. - refactor(widgets, test): Replace
ReactterContextNotFoundExceptiontoReactterInstanceNotFoundException. - refactor(widgets, test): Remove
listenAllHooksproperty fromReactterComponent, uselistenAll. - refactor(widgets, test): Remove
listenHooksproperty fromReactterComponentandReactterProvider.contextOf, uselistenStates. - refactor(hooks, test): Remove
contextproperty fromUseAsyncState,UseContext,UseEvent,UseReducerandUseState. - refactor(hooks, test): Remove type
ReactterAction,typeis String. - refactor(core, widgets, test): Delete
ReactterBuilderandReactterScope, replace tobuild,StatelessWidget,StatefulWidgetor any Widget that exposeBuildContext.
Enhancements #
- feat(core): Add
attachTo,detachToandcreateStatemethods toReactterState.
Fixes #
- refactor(core): Fix
hasListenerno depend ofReactterNotifyManager.
Internal #
- refactor, doc(example): Adjust to new changes.
- doc: Change documentation to better readability and adjut to new changes.
4.1.1 #
Fixes #
- fix(core): Fix predispose all hook states.
Internal #
- refactor(example): Minor changes in some examples.
- refactor(example): Improve code and design of tree example.
- refactor(example): Improve code of calculator example.
- refactor(example): Improve code of animation example.
- doc: Add link to examples using zapp
4.1.0 #
Enhancements #
- perf(core): Improve performance for changing states.
- perf(engine): Improve management for context dependencies.
Fixes #
- fix(core): Remove the callbacks of one events when the instance will be disposed.
Internal #
- refactor(example): Improve examples and fix some bugs.
- doc: Fix documentation.
4.0.0 #
Enhancements #
- feat(core): Add
Obj. - feat(core): Add
Signal. - feat(core): Add
ReactterSignalProxymixin. - feat(core): Add
ReactterNotifyManagermixin. - feat(core): Add
ReactterStatemixin. - refactor(core,hooks): Manage event separate from
UseEventhook. - perf(core): Improve to manage instances.
- perf(core): Improve to manage state.
- perf(widgets,core): Improve performance on
ReactterProvider. Now there is no need to useReactterComponentorReactterBuilder. The instance can be accessed directly from the context(BuildContext) and just the part belonging to the context is re-built. - feat(widgets): Add
ReactterWatcher. You can use theSignalvariable inReactterWatcherand react when it changed forReactterWatcher's widgets rebuild.
Breakings #
- refactor(core): Remove
typedefinnecesary. - refactor(hooks): Fix dispose of
UseContextandUseEffect. - build(widgets): Mark
ReactterScopeas deprecated. Use any Widget that exposes theBuildContextlikeBuild,StatelessWidgetorStatefulWidgetinstead. - build(widgets): Mark
listenHooksandlistenAllHooksas deprecated. UselistenStatesandlistenAllinstead. - refactor(widgets): Remove
onInitfromReactteProviderandReactterComponent. - refactor(widget): Add
ReactterContextargument inbuilderofReactterProvider.
Fixes #
- fix(core): Don't allow increasing listeners count, if event don't exist.
- fix(widgets): Clear previous signals saved.
- fix(core): Remove one callback using off method and was changed how to storage event.
Internal #
- test: Refactor test and add event manager test.
- refactor(test): Fix test and add new tests.
- build(engine): Rename some files.
- refactor(test): Fix test and add
ReactterWatchertest. - refactor(examples): Improve examples code and add calculator example.
- doc: Fix documentation and add new documentation.
- test(core,hooks): Fix dispose on some tests.
- refactor(examples): Do counter more simple.
3.2.1-dev.2 #
Enhancements #
- refactor(engine): Use
ReactterScopeInheritedElementas mixin onReactterProviderInheritedElement. - perf(widget): Improve
ReactterBuilderperformance.
3.2.0 #
Enhancements #
- feat(hooks): Add
UseReducerhook.
Breakings #
- refactor(core): Replace
ReactterInstanceManagerextension to class.
Fixes #
- refactor(hooks): Move events storage variable.
Internal #
- refactor(examples): Improve examples code.
- docs: Update roadmap.
- docs: Fix some typos and improve documentation.
3.1.1 #
Fixes #
- fix(widgets): Fix
childandbuilderofReactterProvideris not required when useReactterProviders.
3.1.0 #
Breakings #
- refactor(core): Remove selector aspect from
ReactterProvider.of.
Fixes #
- fix(core): Fix
ReactterInstanceManager's get method create instance when instance didn't create yet. - refactor(engine, widgets): Add validations about
childandbuilderproperties.
Enhancements #
- refactor(core): Change
Reactter.deletenamed argument to positional argument.
Internal #
- docs: Fix README documentation.
- refactor(tests): Add test coverage of 100%.
3.0.0 #
Breakings #
- build: Change structure folder. Now the package was separated into two packages, one for dart only(
reactter) and one for flutter(flutter_reactter). - refactor(hooks): Type return on
UseAsyncState.when. - refactor(widgets): Replace
UseContexttoReactterProvider. - refactor(widgets): Replace
ReactterProvidertoReactterProviders. - refactor: Rename
LifeCycleEvent.onWillMounttoLifecycle.willMount,LifeCycleEvent.onDidMounttoLifecycle.didMount,LifeCycleEvent.onWillUpdatetoLifecycle.willUpdate,LifeCycleEvent.onDidUpdatetoLifecycle.didUpdateandLifeCycleEvent.onWillUnmounttoLifecycle.willUnmount. - refactor(core): Move
Reactter.factory.registertoReactter.register,Reactter.factory.unregisteredtoReactter.unregister,Reactter.factory.existsInstancetoReactter.factory.exists,Reactter.factory.getInstancetoReactter.get,Reactter.factory.deletedInstancetoReactter.delete. - refactor(core): Replace
ReactterSubscribersManagertoUseEvent. - refactor(core): Replace
BuildContext.readandBuildContext.readIdtoBuildContext.use.
Enhancements #
- feat(widgets): Improve finding
ReactterContextin the widget tree via theBuildContext. Now the operation of findingReactterContextis O(1) andReactterContextusing id is O(2). - refactor(hooks): Add more
Lifecycleevents(Lifecycle.registered,Lifecycle.unregistered,Lifecycle.registeredandLifecycle.destroyed) - feat(hooks): Add
UseContexthook. - feat(hooks): Add
UseEventhook. - feat(widgets): Add
ReactterScopewidget. - refactor(core): Add
Reactter.createandReactter.find.
2.3.3 #
2.3.1 #
Internal #
- fix(example): Fix typo on counter example button.
- fix(example): Add implement tags on animation example.
2.3.0 #
Breakings #
- refactor: Rename
context.oftocontext.watch. - refactor: Rename
context.ofIdtocontext.watchId. - refactor: Rename
context.ofStatictocontext.read. - refactor: Rename
context.ofIdStatictocontext.readId. - refactor: Move subscribe and publish pattern to
ReactterSubscribersManagerclass. Can use subscribe and publish pattern with enum type specified. - refactor(widgets): Use
ReactterInheritedProvideras scope onReactterBuilder. - refactor(widgets): Add
ReactterBuilderas scope when didn't has builder onReactterComponent. - refactor(core):
HookManagersubscribe towillUpdateanddidUpdateevent. - refactor(core):
WillUpdateandDidUpdateevent trigger when itsReactterHookupdate. - refactor(engine): Manage dependencies of
ReactterPubSubandlifecycleofReactterContext. - refactor(widget): Performance as the instance of
contextis listened to mark need build. - refactor(hooks, widgets) - Rename
UseProvidetoReactterProvider.
Fixes #
- fix(hooks,widgets): Delete instances of
UseContextwhen dispatch updated event onReactterProvider, to prevent has instances duplicated. - refactor(widget): Fix
ReactterBuilder.
Enhancements #
- feat(widgets): Send
idfor findReactterContextonReactterComponent. - feat(widget): Add type on
listenerHooksofReactterBuilder. - feat(hooks): Add argument to
resolvemethod ofUseAsyncState. - feat(hooks): Add
lifecyclewillUpdateanddidUpdate. - feat(widget): Add
onInittoUseContext. - feat(hooks):
UseEffecthas lifecycle control of the context. - feat(hook)
UseContextworks with unique ids to create unique instances. - feat(widget): Add
ReactterComponent. - refactor(core): Remove context property as public on
ReactterHook. - feat(engine): Remove dependencies when
ReactterProviderunmount. - refactor(core): Remove unnecessary event listeners from
ReactterContext. - refactor(core,hooks): Remove unnecessary code.
- refactor(engine): Remove props unnecessary on
ReactterInheritedProvider. - refactor(hooks): Clear code and do code simple on
UseAsyncState. - refactor(core): Improve performance how instances manager on
ReactterFactory. - refactor(core): Improve
UseEffect. Now the return of callback execute when a hook was change orwillUnmountevent was invoke. - refactor(core): Improve
lifecycleevents. Now it uses as subscription.
Internal #
- docs: Fix some documentation.
- feat(example): Add more example with animation.
- feat(example): Add new examples.
- docs: Add badgets, reorder topic, fix examples and improve redaction on README.
- docs: Add more documentation.
- tests: Add tests for
hooksandWidgets.
1.0.1 #
1.0.0 #
Enhancements #
-
No need package dependencies: We decided to remove all dependencies and create a new state management from scratch.
-
Controller now is Context:
ReactterControllerhas been replaced byReactterContext, which are the classes that going to manage our states. -
Two ways to manage state: You can control the listeners from context like this:
class AppContext extends ReactterContext { /* You can create the state here and add it to dependencies in constructor with listenHooks() */ final username = UseState<String>(""); AppContext(){ listenHooks([username]); } /* But we recommend to give the context to the state this way: With this, you no longer need to put it in listenHooks() which is cleaner */ late final firstName = UseState<String>("Leo", context: this); late final lastName = UseState<String>("LeΓ³n", context: this); } -
Added UseProvider widget:
UseProviderprovide allReactterContextto his children.UseProvider( contexts: [ UseContext( () => AppContext(), init: true, ), ], builder: (context, _) { // Get all the states listeners of context. final appContext = context.of<AppContext>(); // Get the listener of an specific state to rebuild. final appContext = context.of<AppContext>((ctx) => [ctx.userName]); // Read all the states, but no rebuild when change. final appContextStatic = context.ofStatic<AppContext>(); return Text(appContext.username.value); } ); -
Remove UseEffect widget: This widget has been replaced by a class called
UseEffect. It has exactly the same functionality as theReact Hook, when a dependency changes, executes the callback parameter.UseEffect((){ userName.value = firstName + lastName; }, [firstName, lastName]);
-Note*: UseEffect has to be called inside context constructor.
-
Added custom Hooks: You can create your own hooks with mixin inherit from
ReactterHook.mixin UseCart on ReactterHook { late final cart = UseState<Cart?>(null, context: this); addProductToCart(Product product) { final oldProducts = cart.value.products; cart.value = cart.value? .copyWith(products: [...oldProducts, product]); } } -
Added UseAsyncState class: If you need an async state, you can use this:
class AppContext extends ReactterContext { ... late final userName = UseAsyncState<String>("Init state", fillUsername, context: this); Future<String> fillUsername() async { final userFromApi = await getUserName(); return userFromApi; } ... } -
Added UseAsyncState.when function: Added this function to controll the async flow from
UseAsyncState:... ), userContext.userName.when( // Base state standby: (value) => Text("Standby: " + value), // When is executing the async code loading: () => const CircularProgressIndicator(), // When the async code has finished done: (value) => Text(value), // When it throw an error error: (error) => const Text( "Unhandled exception", style: TextStyle(color: Colors.red), ), ), ... -
Added lifecycle methods to ReactterContext:
@override awake() { // Executes when the instance starts building. } @override willMount() { // Before the dependency widget will mount in the tree. } @override didMount() { // After the dependency widget did mount in the tree. } @override willUnmount() { // When the widget removes from the tree. }
Internal #
- Fix some documentation.
- Package description (was too short).
- Remove unused imports in library.
- Documentation
- 130 points in pub.dev.
1.0.0-dev #
Enhancements #
-
Controller now is Context:
ReactterControllerhas been replaced byReactterContext, which are the classes that going to manage our states.class AppContext extends ReactterContext {}
Internal #
- No need package dependencies: We decided to remove all dependencies and create a new state management from scratch.
