Skip to content

Commit e7a9b54

Browse files
authored
Merge pull request #2 from 2devs-team/pre-release_6.0.0
Pre release 6.0.0
2 parents 845b31a + eaafc2f commit e7a9b54

136 files changed

Lines changed: 5691 additions & 2474 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: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# Reactter
22

3+
## 6.0.0
4+
5+
### Enhancements
6+
7+
- **feat(args):** Implement generic arguments.
8+
- Add the [`Args`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args-class.html) class which represent one or more arguments.
9+
- Add the [`Args1`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args1-class.html), [`Args2`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args2-class.html) and [`Args3`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args3-class.html) classes which represent one, two and three arguments respectively.
10+
- Add the types [`ArgsX2`](https://pub.dev/documentation/reactter/6.0.0/reactter/ArgsX2.html) and [`ArgsX3`](https://pub.dev/documentation/reactter/6.0.0/reactter/ArgsX3.html) which represent [`Args2`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args2-class.html) and [`Args3`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args3-class.html) with the same arguments type.
11+
- Add [`ary`](https://pub.dev/documentation/reactter/6.0.0/reactter/AryFunction/ary.html) methods for converting Function to Function with generic arguments.
12+
- **feat(memo):** Implement the [`Memo`](https://pub.dev/documentation/reactter/6.0.0/reactter/Memo-class.html) class. It's used for memoizing values returned by a calcutate function.
13+
- **feat(memo):** Add [`MemoInterceptors`](https://pub.dev/documentation/reactter/6.0.0/reactter/MemoInterceptors-class.html), [`MemoInterceptor`](https://pub.dev/documentation/reactter/6.0.0/reactter/MemoInterceptor-class.html) and [`MemoInterceptorWrapper`](https://pub.dev/documentation/reactter/6.0.0/reactter/MemoInterceptorWrapper-class.html) for intercepting and handling various events during the memoization process.
14+
- **feat(memo):** Add [`AsyncMemoSafe`](https://pub.dev/documentation/reactter/6.0.0/reactter/AsyncMemoSafe-class.html) for removing the memoized value if its futures that throw an error when executed.
15+
- **feat(memo):** Add [`TemporaryCacheMemo`](https://pub.dev/documentation/reactter/6.0.0/reactter/TemporaryCacheMemo-class.html) for removing memoized values from the cache after a specified duration.
16+
- **feat(framework, widgets)**:Improve `ReactterInstanceManager` and `ReactterInstance`.
17+
- Add `ref` parameter to [`Reactter.get`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/get.html).
18+
- Add [`Reactter.destory`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/destroy.html).
19+
- Add [`InstanceManageMode.builder`](https://pub.dev/documentation/reactter/6.0.0/InstanceManageMode/InstanceManageMode.builder.html), [`InstanceManageMode.factory`](https://pub.dev/documentation/reactter/6.0.0/InstanceManageMode/InstanceManageMode.factory.html) and [`InstanceManageMode.singleton`](https://pub.dev/documentation/reactter/6.0.0/InstanceManageMode/InstanceManageMode.singleton.html) enums. These types represent different ways of creating and managing instances.
20+
- Add [`Reactter.getInstanceManageMode`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/getInstanceManageMode.html) method for getting the instance type of the instance specified.
21+
- Add [`Reactter.isRegistered`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/isRegistered.html) method for check if an instance is registered in Reactter.
22+
- Add [`Reactter.lazyBuilder`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/lazyBuilder.html), [`Reactter.lazyFactory`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/lazyFactory.html), [`Reactter.lazySingleton`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/lazySingleton.html) methods to register a builder function to create a new instance in one of the different types.
23+
- Add [`Reactter.builder`,](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/builder.html) [`Reactter.factory`,](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/factory.html) [`Reactter.singleton`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/singleton.html) methods to create a new instance in one of the different types.
24+
- Add [`type`](https://pub.dev/documentation/flutter_reactter/6.0.0/flutter_reactter/ReactterProvider/type.html) property to [`ReactterProvider`](https://pub.dev/documentation/flutter_reactter/6.0.0/flutter_reactter/ReactterProvider-class.html).
25+
- **feat(hooks)**: Improve [`UseInstance`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance-class.html) hook.
26+
- Add [`UseInstance.register`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.register.html) constructor for registering the builder function when it instantiated.
27+
- Add [`UseInstance.create`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.create.html) constructor to create an instancia when it instantiated.
28+
- Add [`UseInstance.get`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.get.html) constructor to create and/or get an instancia when it instantiated.
29+
- Add [`UseInstance.lazyBuilder`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.lazyBuilder.html), [`UseInstance.lazyFactory`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.lazyFactory.html), [`UseInstance.lazySingleton`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.lazySingleton.html) factories to register a builder function to create a new instance in one of the different types when it instantiated.
30+
- Add [`UseInstance.builder`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.builder.html), [`UseInstance.factory`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.factory.html), [`UseInstance.singleton`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance/UseInstance.singleton.html) factories to create a new instance in one of the different types when it instantiated.
31+
32+
### Breakings
33+
34+
- **refactor(framework)**: Replace `Reactter.instanceOf` to [`Reactter.find`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/find.html).
35+
- **refactor(framework)**: Change builder parameter of [`Reactter.register`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/register.html) and [`Reactter.create`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/create.html) to positional parameter.
36+
- **refactor(hooks):** Add [`UseAsyncState.withArg`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseAsyncState/withArg.html) for using [`UseAsyncState`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseAsyncState-class.html) with [`Args`](https://pub.dev/documentation/reactter/6.0.0/reactter/Args-class.html).
37+
- Now, the [`resolve`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseAsyncState/resolve.html) method of [`UseAsyncState`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseAsyncState-class.html) is used without arguments. Replace with [`UseAsyncState.withArg`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseAsyncState/withArg.html). Its [`resolve`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseAsyncStateArgs/resolve.html) method allows to use arguments.
38+
- **refactor(hooks, example):** Deprecate [`UseState.initial`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseState/initial.html) and [`UseState.reset`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseState/reset.html).
39+
- Avoid using it.
40+
- **refactor(hooks):** Deprecate [`UseEvent`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseEvent-class.html) hook.
41+
- Use event shortcuts instead.
42+
- **refactor(hooks, test):** Deprecate [`UseContext`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseContext.html) hook.
43+
- Use manage instances shortcuts or [`UseInstance`](https://pub.dev/documentation/reactter/6.0.0/reactter/UseInstance-class.html) instead.
44+
- **refactor(framework)**: The [`Reactter.unregister`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterInstanceManager/unregister.html) couldn't deregister the instance builder when the instance is active.
45+
- **refactor(framework)**: Rename `Reactter.dispose` to [`Reactter.offAll`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterEventManager/offAll.html).
46+
- **refactor(types)**: Rename `ContextBuilder` to [`InstanceBuilder`](https://pub.dev/documentation/reactter/6.0.0/reactter/InstanceBuilder.html) and `InstanceBuilder` to [`InstanceContextBuilder`](https://pub.dev/documentation/reactter/6.0.0/reactter/InstanceContextBuilder.html).
47+
- **reactor(framework)**: Rename `Reactter.lazy` to [`Reactter.lazyState`](https://pub.dev/documentation/reactter/6.0.0/reactter/ReactterStateShortcuts/lazyState.html).
48+
49+
### Internal
50+
51+
- **refactor(framework, hooks, test)**: Improve code structure and how to attach an instance to states using `ReactterZone` and structure code of `ReactterState`.
52+
- **refactor(example)**: Improve examples using the new features.
53+
- **test(framework, widgets, hooks)**: Add some tests about `ReactterInstanceManager`, `ReactterInstance`, `UseInstance`
54+
- **test(framework):** Improve tests.
55+
- **test(framework):** Add `Reactter.destroy` test.
56+
- **test(memo):** Add `Memo` and `MemoInterceptor` test.
57+
- **test(args):** Add `Args` test.
58+
- **test(hooks):** Add `UseAsyncState.withArg` test.
59+
- **test(hooks):** Add `UseInstance` test.
60+
- **fix(test)**: Fix grammar of test description.
61+
362
## 5.1.2
463

564
### Fixes
@@ -73,7 +132,7 @@
73132

74133
## 5.0.0
75134

76-
### Breaking
135+
### Breakings
77136

78137
- **refactor(engine, widgets, core, hooks, test)**: Delete `ReactterContext` and `ReactterHookManager` and remove all about it.
79138
- **refactor(widgets, test)**: Replace `ReactterContextNotFoundException` to `ReactterInstanceNotFoundException`.
@@ -149,7 +208,7 @@ Now there is no need to use `ReactterComponent` or `ReactterBuilder`. The instan
149208
- **feat(widgets)**: Add [`ReactterWatcher`](https://pub.dev/documentation/reactter_flutter/4.0.0/widgets/ReactterWatcher-class.html).
150209
You can use the `Signal` variable in `ReactterWatcher` and react when it changed for `ReactterWatcher`'s widgets rebuild.
151210

152-
### Breaking
211+
### Breakings
153212

154213
- **refactor(core)**: Remove `typedef` innecesary.
155214
- **refactor(hooks)**: Fix dispose of `UseContext` and `UseEffect`.
@@ -188,7 +247,7 @@ You can use the `Signal` variable in `ReactterWatcher` and react when it changed
188247

189248
- **feat(hooks)**: Add [`UseReducer`](https://pub.dev/documentation/reactter/3.2.0/hooks/UseReducer-class.html) hook.
190249

191-
### Breaking
250+
### Breakings
192251

193252
- **refactor(core)**: Replace `ReactterInstanceManager` extension to class.
194253

@@ -220,7 +279,7 @@ You can use the `Signal` variable in `ReactterWatcher` and react when it changed
220279

221280
## 3.1.0
222281

223-
### Breaking
282+
### Breakings
224283

225284
- **refactor(core)**: Remove selector aspect from `ReactterProvider.of`.
226285

@@ -240,7 +299,7 @@ You can use the `Signal` variable in `ReactterWatcher` and react when it changed
240299

241300
## 3.0.0
242301

243-
### Breaking
302+
### Breakings
244303

245304
- **build**: Change structure folder. Now the package was separated into two packages, one for dart only([`reactter`](https://pub.dev/packages/reactter)) and one for flutter([`flutter_reactter`](https://pub.dev/packages/flutter_reactter)).
246305
- **refactor(hooks)**: Type return on [`UseAsyncState.when`](https://pub.dev/documentation/reactter/3.0.0/reactter/UseAsyncState/when.html).
@@ -288,7 +347,7 @@ You can use the `Signal` variable in `ReactterWatcher` and react when it changed
288347

289348
## 2.3.0
290349

291-
### Breaking
350+
### Breakings
292351

293352
- **refactor**: Rename `context.of` to `context.watch`.
294353
- **refactor**: Rename `context.ofId` to `context.watchId`.

0 commit comments

Comments
 (0)