diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-04-13 22:48:34 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-04-13 22:48:34 +0300 |
| commit | fd6888cce41a03fd4269fa8e243fcb19f6e0a05f (patch) | |
| tree | c6c20170f0876584d90320eda19588ee7f3812f9 /README.md | |
| parent | 17f7ac284dc4fe25fd3a97386a410fbec93859fb (diff) | |
Update import paths and subscription count method
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -7,7 +7,7 @@ Create scaleable event-driven applications with EventX, inspired by [re-frame](h This is an example application that demonstrates how to use the EventX library. It has a single starting point event called `request`, which returns an updated state, which changes the `counter`. When that state changes, the subscriber for the `counter` state fires. ```typescript -import EventX from "eventx"; +import EventX from "@askonmm/eventx"; type AppState = { counter: number; @@ -51,7 +51,7 @@ npm i @askonmm/eventx At the core of your application is state. You start by initiating EventX with some initial state, like so: ```typescript -import eventx from "eventx"; +import eventx from "@askonmm/eventx"; type AppState = { counter: number; @@ -201,10 +201,10 @@ If you want to get the number of subscriptions for a specific event or state cha ```typescript // State change subscriptions -$.getSubscriptionCount("$counter"); +$.subscriptionCount("$counter"); // Event subscriptions -$.getSubscriptionCount("some-event-name"); +$.subscriptionCount("some-event-name"); ``` #### Get all subscriptions |
