rx-tiny-flux 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +3 -2
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -201,8 +201,9 @@ This plugin injects `dispatch` and `subscribe` methods into your component's ins
|
|
|
201
201
|
1. **Create your store** instance in `app.js`.
|
|
202
202
|
2. **Import the `storePlugin`** from `rx-tiny-flux`.
|
|
203
203
|
3. **Register the plugin on `BaseApp`**, passing the `store` instance: `BaseApp.use(storePlugin, store)`.
|
|
204
|
-
4. **Register the same plugin on `BasePage
|
|
205
|
-
5. **
|
|
204
|
+
4. **Register the same plugin on `BasePage`** (without the store): `BasePage.use(storePlugin)`. The plugin will automatically find the store from the App.
|
|
205
|
+
5. For a **Side Service**, you can create a separate store or use the same one, but you must pass it during registration, just like with `BaseApp`: `BaseSideService.use(storePlugin, serviceStore)`.
|
|
206
|
+
6. **Use `this.dispatch()` and `this.subscribe()`** inside your App, Pages, and Side Service.
|
|
206
207
|
|
|
207
208
|
Here is a complete example:
|
|
208
209
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rx-tiny-flux",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "A lightweight, minimalist state management library for pure JavaScript projects, inspired by NgRx and Redux, and built with RxJS.",
|
|
5
5
|
"author": "Bernardo Baumblatt <baumblatt@gmail.com>",
|
|
6
6
|
"license": "MIT",
|