From 1a9481066ad2fc02ebe1fb6a2e37ab30918bc065 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Mon, 21 Apr 2025 12:03:36 +0300 Subject: Refactor dispatch parameter naming from 'withData' to 'with' for consistency --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index e92898b..5117fd5 100644 --- a/README.md +++ b/README.md @@ -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, }, }; }); -- cgit v1.2.3