Skip to content

Commit 98e31eb

Browse files
christianalfonigitbook-bot
authored andcommitted
GitBook: [v28] 44 pages modified
1 parent 9eea504 commit 98e31eb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

core/defining-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The **SERIALIZE** symbol will not be part of the actual serialization done with
197197

198198
#### Rehydrating classes
199199

200-
The [**rehydrate**](../api-1/rehydrate.md) _\*\*_utility of Overmind allows you to rehydrate state either by a list of mutations or a state object, like the following:
200+
The [**rehydrate**](../api-1/rehydrate.md) utility of Overmind allows you to rehydrate state either by a list of mutations or a state object, like the following:
201201

202202
{% tabs %}
203203
{% tab title="overmind/actions.js" %}

core/running-side-effects.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ export const api = (() => {
113113
We are doing two things here:
114114

115115
1. We use an [IIFE](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) to create a scoped internal variable to be used for that specific effect
116-
2. We have created an **initialize** method which we can call from the Overmind **onInitialize** action, which runs when the Overmind instance is created
116+
2. We have created an **initialize** method which we can call from the special **onInitializeOvermind** action, which runs when the Overmind instance is created
117117

118118
Example of initializing the effect:
119119

120120
{% tabs %}
121-
{% tab title="overmind/onInitialize.js" %}
121+
{% tab title="overmind/actions.js" %}
122122
```typescript
123-
export const onInitialize = async ({ effects }) => {
123+
export const onInitializeOvermind = async ({ effects }) => {
124124
effects.api.initialize()
125125
state.posts = await effects.api.getPosts()
126126
}
@@ -162,9 +162,9 @@ export const socket = (() => {
162162
```
163163
{% endtab %}
164164

165-
{% tab title="overmind/onInitialize.js" %}
165+
{% tab title="overmind/actions.js" %}
166166
```typescript
167-
export const onInitialize = async ({ state, effects, actions }) => {
167+
export const onInitializeOvermind = async ({ state, effects, actions }) => {
168168
effects.socket.initialize({
169169
onMessage: actions.onMessage,
170170
onStatusChange: actions.onSocketStatusChange,
@@ -209,9 +209,9 @@ export const api = (() => {
209209
In our initialize\(\) we would just have to wait for the initialization to finish before using the API:
210210

211211
{% tabs %}
212-
{% tab title="overmind/onInitialize.js" %}
212+
{% tab title="overmind/actions.js" %}
213213
```typescript
214-
export const onInitialize = async ({ effects }) => {
214+
export const onInitializeOvermind = async ({ effects }) => {
215215
await effects.api.initialize()
216216
state.posts = await effects.api.getPosts()
217217
}

0 commit comments

Comments
 (0)