|
2 | 2 |
|
3 | 3 | 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. |
4 | 4 |
|
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. |
6 | 6 |
|
7 | 7 | ```typescript |
8 | 8 | import App from 'overmind' |
@@ -53,7 +53,7 @@ This information is automatically passed to the Overmind devtools. |
53 | 53 |
|
54 | 54 | **addMutationListener** |
55 | 55 |
|
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: |
57 | 57 |
|
58 | 58 | ```typescript |
59 | 59 | const listener = addMutationListener(paths, () => { |
@@ -223,7 +223,7 @@ export default connect(App) |
223 | 223 | What to take notice of: |
224 | 224 |
|
225 | 225 | * 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\) |
227 | 227 | * 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. |
228 | 228 | * 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\) |
229 | 229 |
|
0 commit comments