You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/docs/overview/actions.md
+60-4
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Actions
2
2
3
-
Actions are async operations apps can perform using the `EventStore` as the known state, the `EventFactory` to build new events, and a `publish` method to publish or save the resulting events
3
+
Actions are common pre-built async operations apps can perform. they use the `EventStore` as state, the `EventFactory` to build new events, and a `publish` method to publish or save the resulting events
For performance reasons, its recommended to only create a single `ActionHub` instance for your whole app
30
+
:::
31
+
26
32
## What is an action
27
33
28
-
WIP
34
+
An [Action](https://hzrd149.github.io/applesauce/typedoc/types/applesauce_actions.Action.html) is an async method that reads from the event store and preforms actions by creating events using the event factory and event publisher
35
+
36
+
You can see the full list of built-in actions in the [reference](https://hzrd149.github.io/applesauce/typedoc/modules/applesauce_actions.Actions.html)
29
37
30
38
## Running actions
31
39
32
-
WIP
40
+
[ActionHub.run](https://hzrd149.github.io/applesauce/typedoc/classes/applesauce_actions.ActionHub.html#run) can be used to run actions once an action hub is created
41
+
42
+
:::warning
43
+
To avoid overriding replaceable events, actions will throw if an existing replaceable event cant be found
Copy file name to clipboardexpand all lines: packages/docs/overview/loaders.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Loaders
2
2
3
-
The `applesauce-loaders` package contains a bunch of loader classes built on top of [rx-nostr](https://github.com/penpenpng/rx-nostr)
3
+
The `applesauce-loaders` package contains loader classes built on top of [rx-nostr](https://github.com/penpenpng/rx-nostr) that can be used to setup common event loading patterns
0 commit comments