Skip to content

Commit 0c283c1

Browse files
authored
Merge pull request #4 from 2devs-team/develop
Master <= Develop
2 parents de9580b + 444f6bd commit 0c283c1

133 files changed

Lines changed: 4207 additions & 2723 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,72 @@
11
# Reactter
22

3+
## 7.0.0
4+
5+
### Enhancements
6+
7+
- **feat(core, framework):** Add [`Reactter.batch`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterInterface/batch.html) and [`Reactter.untracked`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterInterface/untracked.html) methods.
8+
- [`Reactter.batch`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterInterface/batch.html) hepls to execute the given `callback` function 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.
9+
- [`Reactter.untracked`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterInterface/untracked.html) hepls to execute the given `callback` function without tracking any state changes. This means that any state changes that occur inside the `callback` function will not trigger any side effects.
10+
- **refactor(framework):** Refactor lifecycle event handling and add lifecycle observer interface.
11+
- Add [`LifecycleObserver`](https://pub.dev/documentation/reactter/7.0.0/reactter/LifecycleObserver-class.html) inteface for event handling of the instance.
12+
- Add [`didUnmount`](https://pub.dev/documentation/reactter/7.0.0/reactter/Lifecycle.html) lifecycle.
13+
- **refactor(core, framework, types):** Add [`LogLevel`](https://pub.dev/documentation/reactter/7.0.0/reactter/LogLevel.html) enum and update [`defaultLogWriterCallback`](https://pub.dev/documentation/reactter/7.0.0/reactter/defaultLogWriterCallback.html) signature.
14+
- **refactor(hooks):** Improve [`UseEffect`](https://pub.dev/documentation/reactter/7.0.0/reactter/UseEffect-class.html) performance and readability.
15+
- Add [`UseEffect.runOnInit`](https://pub.dev/documentation/reactter/7.0.0/reactter/UseEffect/UseEffect.runOnInit.html) constructor to execute callback effect on initialization.
16+
- **feat(framework, widgets):** Add [`ReactterProvider.lazy`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterProvider/ReactterProvider.lazy.html) constructor for lazy instance initialization.
17+
- **refactor(widgets):** Add `id`property to [`ReactterComponent`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterComponent-class.html) for debugging information.
18+
19+
### Breakings
20+
21+
- **refactor(extensions, hooks, objs, signals):** Remove features deprecated.
22+
- Remove [`List<ReactterState>.when`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/ReactterStateListExtension/when.html), use [`context.select`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterBuildContextExtension/select.html) or [`UseCompute`](https://pub.dev/documentation/reactter/7.0.0/reactter/UseCompute-class.html) instead.
23+
- Remove [`UseContext`](https://pub.dev/documentation/reactter/6.2.0/reactter/UseContext.html), use [`UseInstance`](https://pub.dev/documentation/reactter/6.2.0/reactter/UseInstance-class.html) instead.
24+
- Remove [`UseEvent`](https://pub.dev/documentation/reactter/6.2.0/reactter/UseEvent-class.html), use event shortcuts instead.
25+
- Remove `initialState` and `reset` from [`UseState`](https://pub.dev/documentation/reactter/6.2.0/reactter/UseState-class.html).
26+
- Remove [`.obj`](https://pub.dev/documentation/reactter/6.2.0/reactter/ObjGenericTypeExt.html), use [`Obj`](https://pub.dev/documentation/reactter/7.0.0/reactter/Obj-class.html) class instead.
27+
- Remove [`.signal`](https://pub.dev/documentation/reactter/6.2.0/reactter/SignalGenericTypeExt.html), use [`Signal`](https://pub.dev/documentation/reactter/7.0.0/reactter/Signal-class.html) class instead.
28+
- **refactor(framework, widgets, test):** Change the position of [`InstanceContextBuilder`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/InstanceContextBuilder.html)([`InstanceChildBuilder`](https://pub.dev/documentation/reactter/7.0.0/reactter/InstanceChildBuilder.html) now) arguments.
29+
- Move `context` to first argument on [`InstanceContextBuilder`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/InstanceContextBuilder.html)([`InstanceChildBuilder`](https://pub.dev/documentation/reactter/7.0.0/reactter/InstanceChildBuilder.html) now).
30+
- Adapt the [`InstanceContextBuilder`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/InstanceContextBuilder.html)([`InstanceChildBuilder`](https://pub.dev/documentation/reactter/7.0.0/reactter/InstanceChildBuilder.html) now) of [`ReactterComponent`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterComponent-class.html), [`ReactterConsumer`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterConsumer-class.html) and [`ReactterProvider`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterProvider-class.html) widgets.
31+
- **refactor(core, hooks):** Rename [`attachTo`](https://pub.dev/documentation/reactter/6.2.0/reactter/ReactterState/attachTo.html) to [`bind`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterState/bind.html), [`detachInstance`](https://pub.dev/documentation/reactter/6.2.0/reactter/ReactterState/detachInstance.html) to [`unbind`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterState/unbind.html) and [`instanceAttached`](https://pub.dev/documentation/reactter/6.2.0/reactter/ReactterState/instanceAttached.html) to [`instanceBinded`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterState/instanceBinded.html).
32+
- **refactor(hooks):** Improve [`UseEffect`](https://pub.dev/documentation/reactter/7.0.0/reactter/UseEffect-class.html) performance and readability.
33+
- Remove [`context`](https://pub.dev/documentation/reactter/6.2.0/reactter/UseEffect/context.html) argument from `UseEffect`. It is no longer useful. Can use [`bind`](https://pub.dev/documentation/reactter/7.0.0/reactter/ReactterState/bind.html) method instead.
34+
35+
### Fixes
36+
37+
- **fix(obj):** Fix equality comparison in `ObjBase` class.
38+
- **fix(core):** Resolve event for both types(instanceRef, instanceObj) and log event error.
39+
- **fix(core):** Find the instance registered by the instance manager when searching for the extended class.
40+
- **refactor(core):** Fix out-of-bounds index on `getHashCodeRefAt` method.
41+
42+
### Internal
43+
44+
- **refactor(framework, widgets, test):** Change the position of [`InstanceContextBuilder`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/InstanceContextBuilder.html)([`InstanceChildBuilder`](https://pub.dev/documentation/reactter/7.0.0/reactter/InstanceChildBuilder.html) now) arguments.
45+
- Adjust the tests about [`ReactterComponent`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterComponent-class.html), [`ReactterConsumer`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterConsumer-class.html) and [`ReactterProvider`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterProvider-class.html) widgets.
46+
- Adjust the documentation about [`ReactterComponent`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterComponent-class.html), [`ReactterConsumer`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterConsumer-class.html) and [`ReactterProvider`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterProvider-class.html) widgets.
47+
- **refactor(framework, widgets, test):** Improve framework structure and simplify the [`ReactterProvider`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterProvider-class.html) code.
48+
- Remove `Reactter` prefix of the framework classes.
49+
- Add `ProviderBase`, `ProviderImpl`, `ProviderElement` and `ProviderRef` class.
50+
- Rename [`InstanceContextBuilder`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/InstanceContextBuilder.html) to [`InstanceChildBuilder`](https://pub.dev/documentation/reactter/7.0.0/reactter/InstanceChildBuilder.html) and [`InstanceValueBuilder`](https://pub.dev/documentation/flutter_reactter/6.2.0/flutter_reactter/InstanceValueBuilder.html) to [`InstanceValueChildBuilder`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/InstanceValueChildBuilder.html).
51+
- Add [`ChildBuilder`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ChildBuilder.html) type.
52+
- Add `Reactter.getHashCodeRef` method.
53+
- **refactor:** Refactor file structure and imports.
54+
- **refactor(core, framework, hooks, signal):** Rename variables of `ReactterZone` and improve `ReactterState` implementation.
55+
- **refactor(test):** Add `lazyState`, `untracked` and `batch` tests.
56+
- **refactor(core, test):** Fix lifecycle event handling and add lifecycle_observer test.
57+
- **refactor(core, framework, test):** Refactor event manager and remove unused code for 100% coverage.
58+
- **refactor(core, framework):** Add `BindingZone` class and update references.
59+
- **fix(core):** Fix generic type constraint in `_getInstanceRef` method.
60+
- **refactor(core):** Refactor event handling logic and optimize listener removal.
61+
- **test(core, hooks):** Add tests for signal usage on instance and binding to another instance.
62+
- **test(widgets):** Add [`ReactterProvider.lazy`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterProvider/ReactterProvider.lazy.html) tests, update [`ReactterComponent`](https://pub.dev/documentation/flutter_reactter/7.0.0/flutter_reactter/ReactterComponent-class.html) tests and add [`LifecycleObserver`](https://pub.dev/documentation/reactter/7.0.0/reactter/LifecycleObserver-class.html) to `TestController`.
63+
- **fix(example):** Update dependencies and fix code formatting on examples.
64+
365
## 6.2.0
466

567
### Breakings
668

7-
- **refactor:** Deprecate `.signal` and `.obj` extensions.
69+
- **refactor:** Deprecate [`.signal`](https://pub.dev/documentation/reactter/6.2.0/reactter/SignalGenericTypeExt.html) and [`.obj`](https://pub.dev/documentation/reactter/6.2.0/reactter/ObjGenericTypeExt.html) extensions, use [`Signal`](https://pub.dev/documentation/reactter/6.2.0/reactter/Signal-class.html) and [`Obj`](https://pub.dev/documentation/reactter/6.2.0/reactter/Obj-class.html) class instead.
870

971
### Internal
1072

@@ -15,16 +77,16 @@
1577

1678
### Enhancements
1779

18-
- **feat(framework, widgets, extensions):** Add `ReactterSelector` widget and `context.select` method extension.
19-
- `ReactterSelect` and `context.select` help to control the rebuilding of widget tree using a `Selector` methods that allows to select a state specific for listening, and return a computed value.
20-
- **feat(widgets):** Add `ReactterScope` Widget.
80+
- **feat(framework, widgets, extensions):** Add [`ReactterSelector`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterSelector-class.html) widget and [`context.select`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterBuildContextExtension/select.html) method extension.
81+
- [`ReactterSelector`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterSelector-class.html) and [`context.select`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterBuildContextExtension/select.html) help to control the rebuilding of widget tree using a `Selector` methods that allows to select a state specific for listening, and return a computed value.
82+
- **feat(widgets):** Add [`ReactterScope`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterScope-class.html) Widget.
2183
If `ReactterProvider.contextOf` doesn't have a type defined, use `ReactterScope` to work correctly.
2284

2385
### Breakings
2486

25-
- **perf(framework):** Remove `updateAsync` from `ReactterHook` and `ReactterState`.
26-
- **perf(framework):** Remove `emitAsync` from `ReactterEventManager`.
27-
- **refactor(extensions):** Deprecate `List<ReactterState>.when`.
87+
- **perf(framework):** Remove `updateAsync` from [`ReactterHook`](https://pub.dev/documentation/reactter/6.1.0/reactter/ReactterHook-class.html) and [`ReactterState`](https://pub.dev/documentation/reactter/6.1.0/reactter/ReactterState-class.html).
88+
- **perf(framework):** Remove `emitAsync` from [`ReactterEventManager`](https://pub.dev/documentation/reactter/6.1.0/reactter/ReactterEventManager-class.html).
89+
- **refactor(extensions):** Deprecate [`List<ReactterState>.when`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterStateListExtension/when.html), use [`context.select`](https://pub.dev/documentation/flutter_reactter/6.1.0/flutter_reactter/ReactterBuildContextExtension/select.html) or [`UseCompute`](https://pub.dev/documentation/reactter/6.1.0/reactter/UseCompute-class.html) instead.
2890

2991
### Fixes
3092

0 commit comments

Comments
 (0)