Skip to content

Commit 2d2a0ba

Browse files
christianalfonigitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent 0bd2021 commit 2d2a0ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Overmind is a state and side effects management tool for popular JavaScript frameworks. If you are familiar with projects like Redux, Vuex, Mobx or similar solutions, Overmind is taking it to the next step.
44

5-
The default instance of Overmind exposes tools to track access to state and mutation of state. These are the tools you need to integrate Overmind with a view. Luckily Overmind has several preset view implements like **React**, **VueJS, Preact** etc.
5+
The default instance of Overmind exposes tools to track access to state and mutation of state. These are the tools you need to integrate Overmind with a view. Luckily Overmind has several preset view implementations like **React**, **VueJS, Preact** etc.
66

77
```typescript
88
import App from 'overmind'
@@ -53,7 +53,7 @@ This information is automatically passed to the Overmind devtools.
5353

5454
**addMutationListener**
5555

56-
This function is used with the tracked paths:
56+
This function is used with the tracked paths. You typically create the listener on the first render and update it on subsequent renders:
5757

5858
```typescript
5959
const listener = addMutationListener(paths, () => {
@@ -223,7 +223,7 @@ export default connect(App)
223223
What to take notice of:
224224

225225
* We are not interfering in any way with the initial rendering of the app, meaning you just connect state where you need it
226-
* By default Overmind takes a single module with state, actions etc., but **compose** allows us to merge multiple modules together, giving them a namespace \(main and items in this example\)
226+
* By default Overmind takes a single module with state, actions etc., but **compose** allows us to merge multiple modules together, giving them a namespace \("main" and "items" in this example\)
227227
* We separate mutations and other side effects. This makes it absolutely clear where mutations are performed and only the **mutation** operator is allowed to perform these mutations.
228228
* The actions are now just plain functions taking any payload. When the action is typed it requires a value, when it is not typed, it does not require a value \(this is actually very difficult to do in TypeScript\)
229229

0 commit comments

Comments
 (0)