You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -179,7 +179,7 @@ class ReducerCat extends ReducerClass<IReducerCatState> {
179
179
const reducer =ReducerCat.create()
180
180
```
181
181
182
-
> You might have noticed that `ActionReflect` is missing in this version. It's because we no longer use classes for our actions and TypeScript can not provide type metadata.
182
+
> You might have noticed that we always pass actions to `Action` in this version. It's because we no longer use classes for our actions and TypeScript can not provide type metadata.
183
183
184
184
### JavaScript with flux-action-class
185
185
@@ -214,7 +214,7 @@ class ReducerCat extends ReducerClass {
214
214
constreducer=ReducerCat.create()
215
215
```
216
216
217
-
> We can not use `ActionReflect` in JavaScript because there's no compiler which provides us with metadata for type reflection.
217
+
> We can not use `Action` without arguments in JavaScript because there's no compiler which provides us with metadata for type reflection.
218
218
219
219
> Be aware, you have to configure [babel](https://babeljs.io/) to provide you with decorator syntax.
220
220
@@ -262,7 +262,7 @@ Why 3? [Read pitfall #3 from immer's official documentation.](https://github.com
### When we can we omit list of actions for `@Action`?
298
298
299
-
You can use `@ActionReflect` if you want to run a reducer function for a single action. **Works with TypeScript only!** Action must be a class-based action. It can be a flux-action-class' action, a classic NGRX class-based action or any other class which has either a static property `type` or a property `type` on the instance of the class.
299
+
You can omit list of actions for `@Action` if you want to run a reducer function for a single action. **Works with TypeScript only!** Action must be a class-based action. It can be a flux-action-class' action, a classic NGRX class-based action or any other class which has either a static property `type` or a property `type` on the instance of the class.
300
300
301
301
### Running several reducers for the same action
302
302
303
303
If you have declare several reducer functions corresponding to the same action `reducer-class` runs all of them serially (it uses its own implementation of (reduce-reducers)[https://github.com/redux-utilities/reduce-reducers]). The order is defined by [Object.keys](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys).
@@ -343,6 +343,6 @@ console.log(res2) // logs 135: 130 - previous value, 5 is added by addEnergy
343
343
## How does it compare to [ngrx-actions](https://github.com/amcdnl/ngrx-actions)?
344
344
345
345
1. Stricter typings. Now you'll never forget to add initial state, return a new state from your reducer and accidentally invoke `immer` as a result and etc.
346
-
1.`@ActionReflect` can be used to automatically reflect a corresponding action from the type.
346
+
1.`@Action` can be used to automatically reflect a corresponding action from the type.
347
347
1.`ngrx-actions` doesn't allow matching several reducers to the same action, while `reducer-class` allows you to do that and merges them for you.
348
348
1.`reducer-class` is built with both worlds, Angular and Redux, in mind. It means equal support for both of them!
0 commit comments