@@ -70,7 +70,7 @@ Let's see how this all works together ...
70
70
npm install --save redux-logic
71
71
```
72
72
<!-- - WITH REVEAL of USAGE:
73
- npm install --save feature-u # VER: >=0. 1.0 USAGE: createAspect()
73
+ npm install --save feature-u # VER: >=1.0.0 USAGE: createAspect() (v1 replaces App with Fassets obj -AND- publicFace with fassets aspect )
74
74
npm install --save redux-logic # VER: >=0.7.0 USAGE: createLogicMiddleware()
75
75
--->
76
76
@@ -98,16 +98,16 @@ Polyfills](#potential-need-for-polyfills))_.
98
98
99
99
** src/app.js**
100
100
``` js
101
- import {launchApp } from ' feature-u' ;
102
- import {reducerAspect } from ' feature-redux' ; // **2**
103
- import {logicAspect } from ' feature-redux-logic' ; // **1**
104
- import features from ' ./feature' ;
101
+ import {launchApp } from ' feature-u' ;
102
+ import {createReducerAspect } from ' feature-redux' ; // **2**
103
+ import {createLogicAspect } from ' feature-redux-logic' ; // **1**
104
+ import features from ' ./feature' ;
105
105
106
106
export default launchApp ({
107
107
108
108
aspects: [
109
- reducerAspect, // **2**
110
- logicAspect, // **1**
109
+ createReducerAspect (), // **2**
110
+ createLogicAspect (), // **1**
111
111
... other Aspects here
112
112
],
113
113
@@ -140,6 +140,31 @@ Polyfills](#potential-need-for-polyfills))_.
140
140
});
141
141
```
142
142
143
+ 3 . As a convenience, ** feature-redux-logic** auto injects the
144
+ ** feature-u** [ ` Fassets object ` ] as a dependency in your logic
145
+ modules. This promotes full [ Cross Feature Communication] .
146
+
147
+ The following example, demonstrates the availability of the
148
+ ` fassets ` named parameter:
149
+
150
+ ``` js
151
+ import {createLogic } from ' redux-logic' ;
152
+
153
+ export const someLogic = createLogic ({
154
+
155
+ ... snip snip
156
+
157
+ transform ({getState, action, fassets}, next , reject ) {
158
+ ... fassets may be used for cross- feature- communication
159
+ },
160
+
161
+ process ({getState, action, fassets}, dispatch , done ) {
162
+ ... fassets may be used for cross- feature- communication
163
+ }
164
+
165
+ });
166
+ ```
167
+
143
168
144
169
** Well that was easy!!** At this point ** redux-logic** is ** completely
145
170
setup for your application!**
@@ -157,9 +182,9 @@ truly opaque assets _(internal to the feature)_, they are of interest
157
182
to ** feature-redux-logic** to the extent that they are needed to configure
158
183
[ redux-logic] .
159
184
160
- Because logic modules may require access to ** feature-u** 's [ ` App ` ]
161
- object during code expansion, this property can also be a
162
- ** feature-u** [ ` managedExpansion ()` ] callback _ (a function that
185
+ Because logic modules may require access to ** feature-u** 's [ `Fassets
186
+ object` ] during code expansion, this property can also be a
187
+ ** feature-u** [ ` expandWithFassets ()` ] callback _ (a function that
163
188
returns the logic modules)_ ... please refer to ** feature-u** 's
164
189
discussion of [ Managed Code Expansion] .
165
190
@@ -204,7 +229,7 @@ export const doSomething = createLogic({
204
229
... snip snip
205
230
},
206
231
207
- process ({getState, action, app }, dispatch , done ) {
232
+ process ({getState, action, fassets }, dispatch , done ) {
208
233
... snip snip
209
234
}
210
235
@@ -275,6 +300,11 @@ process (_i.e. the inputs and outputs_) are documented here.
275
300
component must be consumed by yet another aspect (_ such as
276
301
[ feature-redux] _ ) that in turn manages [ redux] .
277
302
303
+ - As a convenience, ** feature-redux-logic** auto injects the
304
+ ** feature-u** [ ` Fassets object ` ] as a dependency in your logic
305
+ modules. This promotes full [ Cross Feature Communication] .
306
+ Please refer to the [ Usage] section for examples.
307
+
278
308
279
309
### Error Conditions
280
310
@@ -315,6 +345,8 @@ modules were specified by your features.
315
345
316
346
<ul ><!-- - indentation hack for github - other attempts with style is stripped (be careful with number bullets) --->
317
347
348
+ ` API: createLogicAspect([name='logic']): logicAspect `
349
+
318
350
The ` logicAspect ` is the [ feature-u] plugin that facilitates
319
351
[ redux-logic] integration to your features.
320
352
@@ -383,14 +415,15 @@ implemented)_ is intended to address this issue.
383
415
384
416
385
417
<!-- - feature-u --->
386
- [ feature-u ] : https://feature-u.js.org/
387
- [ `launchApp()` ] : https://feature-u.js.org/cur/api.html#launchApp
388
- [ `createFeature()` ] : https://feature-u.js.org/cur/api.html#createFeature
389
- [ `managedExpansion()` ] : https://feature-u.js.org/cur/api.html#managedExpansion
390
- [ publicFace ] : https://feature-u.js.org/cur/crossCommunication.html#publicface-and-the-app-object
391
- [ `Feature` ] : https://feature-u.js.org/cur/api.html#Feature
392
- [ `App` ] : https://feature-u.js.org/cur/api.html#App
393
- [ Managed Code Expansion ] : https://feature-u.js.org/cur/crossCommunication.html#managed-code-expansion
418
+ [ feature-u ] : https://feature-u.js.org/
419
+ [ `launchApp()` ] : https://feature-u.js.org/cur/api.html#launchApp
420
+ [ `createFeature()` ] : https://feature-u.js.org/cur/api.html#createFeature
421
+ [ `expandWithFassets()` ] : https://feature-u.js.org/cur/api.html#expandWithFassets
422
+ [ `Feature` ] : https://feature-u.js.org/cur/api.html#Feature
423
+ [ `Fassets object` ] : https://feature-u.js.org/cur/api.html#Fassets
424
+ [ Managed Code Expansion ] : https://feature-u.js.org/cur/crossCommunication.html#managed-code-expansion
425
+ [ Cross Feature Communication ] : https://feature-u.js.org/cur/crossCommunication.html
426
+
394
427
395
428
<!-- - react --->
396
429
[ react ] : https://reactjs.org/
0 commit comments