Skip to content

Commit 32e6fdc

Browse files
christianalfonigitbook-bot
authored andcommitted
GitBook: [v23] 3 pages modified
1 parent 0ec9734 commit 32e6fdc

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
* [createOvermindSSR](api-1/createovermindssr.md)
4949
* [derive](api-1/derive.md)
5050
* [effects](api-1/effects.md)
51+
* [events](api-1/events.md)
5152
* [json](api-1/json.md)
5253
* [lazy](api-1/lazy.md)
5354
* [merge](api-1/merge.md)

api-1/createovermind.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,5 @@ const overmind = createOvermind(config, {
8080
})
8181
```
8282

83-
## events
8483

85-
Overmind emits events during execution of actions and similar. It can be beneficial to listen to these events for analytics or maybe you want to create a custom debugging experience. The following events can be listened to by adding a listener to the eventHub:
86-
87-
```typescript
88-
overmind.eventHub.on('action:start', (execution) => {})
89-
overmind.eventHub.on('action:end', (execution) => {})
90-
overmind.eventHub.on('operator:start', (execution) => {})
91-
overmind.eventHub.on('operator:end', (execution) => {})
92-
overmind.eventHub.on('operator:async', (execution) => {})
93-
overmind.eventHub.on('mutations', (executionAndMutations) => {})
94-
overmind.eventHub.on('derived', (derived) => {})
95-
overmind.eventHub.on('derived:dirty', (derivedPathAndFlush) => {})
96-
97-
// Only during development
98-
overmind.eventHub.on('effect', (effectDetails) => {})
99-
overmind.eventHub.on('getter', (getterDetails) => {})
100-
overmind.eventHub.on('component:add', (componentDetails) => {})
101-
overmind.eventHub.on('component:update', (componentDetails) => {})
102-
overmind.eventHub.on('component:remove', (componentDetails) => {})
103-
```
10484

api-1/events.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# events
2+
3+
Overmind emits events during execution of actions and similar. It can be beneficial to listen to these events for analytics or maybe you want to create a custom debugging experience. The following events can be listened to by adding a listener to the eventHub:
4+
5+
```typescript
6+
overmind.eventHub.on('action:start', (execution) => {})
7+
overmind.eventHub.on('action:end', (execution) => {})
8+
overmind.eventHub.on('operator:start', (execution) => {})
9+
overmind.eventHub.on('operator:end', (execution) => {})
10+
overmind.eventHub.on('operator:async', (execution) => {})
11+
overmind.eventHub.on('mutations', (executionAndMutations) => {})
12+
overmind.eventHub.on('derived', (derived) => {})
13+
overmind.eventHub.on('derived:dirty', (derivedPathAndFlush) => {})
14+
15+
// Only during development
16+
overmind.eventHub.on('effect', (effectDetails) => {})
17+
overmind.eventHub.on('getter', (getterDetails) => {})
18+
overmind.eventHub.on('component:add', (componentDetails) => {})
19+
overmind.eventHub.on('component:update', (componentDetails) => {})
20+
overmind.eventHub.on('component:remove', (componentDetails) => {})
21+
```
22+

0 commit comments

Comments
 (0)