diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-04-21 12:03:36 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-04-21 12:03:36 +0300 |
| commit | 1a9481066ad2fc02ebe1fb6a2e37ab30918bc065 (patch) | |
| tree | 55022d76d0b75921c9b89969d11abe08a3dc0b53 /README.md | |
| parent | b60e4887618f2b07c638a7fc0d0cff274e99e8ab (diff) | |
Refactor dispatch parameter naming from 'withData' to 'with' for consistency
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -87,7 +87,7 @@ Subscriptions listen to events or changes to state. Each subscription must retur state: T, // optional dispatch: { to: "event-to-dispatch", - withData: {} // optional + with: {} // optional } // optional } ``` @@ -99,10 +99,10 @@ You can also dispatch multiple events by passing an array of objects, like so: state: T, dispatch: [{ to: "event-to-dispatch", - withData: {} + with: {} },{ to: "another-event-to-dispatch", - withData: {} + with: {} }] } ``` @@ -212,7 +212,7 @@ app.subscribe("some-event-name", (state) => { state, dispatch: { to: "counter-increase", - withData: 5, + with: 5, }, }; }); |
