Skip to content

Commit 9778b47

Browse files
christianalfonigitbook-bot
authored andcommitted
GitBook: [master] 12 pages and one asset modified
1 parent f8211ed commit 9778b47

File tree

13 files changed

+223
-135
lines changed

13 files changed

+223
-135
lines changed

.gitbook/assets/angular.png

11.2 KB
Loading

README.md

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,10 @@
11
# Overmind
22

3-
### Why Overmind?
43

5-
Instead of writing components that isolates state:
64

7-
{% code-tabs %}
8-
{% code-tabs-item title="react.js" %}
9-
```javascript
10-
import React from 'react'
5+
### What is it?
116

12-
class InputComponent extends React.Component {
13-
state = {
14-
value: ''
15-
}
16-
changeValue = (event) => {
17-
this.setState({
18-
value: event.target.value
19-
})
20-
}
21-
render () {
22-
return <input value={this.state.value} onChange={this.changeValue} />
23-
}
24-
}
25-
```
26-
{% endcode-tabs-item %}
27-
{% endcode-tabs %}
28-
29-
You keep your state and logic to change that state in Overmind:
30-
31-
{% code-tabs %}
32-
{% code-tabs-item title="react.js" %}
33-
```javascript
34-
import App from 'overmind/react'
35-
36-
const app = new App({
37-
state: {
38-
value: ''
39-
},
40-
actions: action => ({
41-
changeValue: action()
42-
.map((event) => event.target.value)
43-
.mutation((value, state) => state.value = value)
44-
})
45-
})
46-
47-
const InputComponent = app.connect(
48-
function InputComponent ({ appState, actions }) {
49-
return <input value={appState.value} onChange={actions.changeValue} />
50-
}
51-
)
52-
```
53-
{% endcode-tabs-item %}
54-
{% endcode-tabs %}
55-
56-
There are many tools, like Redux, Mobx, Vuex, Hyperapp etc., that also moves state and logic outside your components. Where Overmind differs is:
7+
Overmind is a tool to build web applications. It allows you to choose your favourite way of expressing UI, while given great insight into your running application using the Overmind development tool.The benefits of Overmind
578

589
* **Automatic render.** When you connect your app to a component the component will automatically and optimally rerender based on the state that is being used inside that component
5910
* **Safe mutations**. There is only one place in Overmind you can change the state of your application and that is inside the mutation operator. Any outside mutations throws errors

SUMMARY.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# Table of contents
22

33
* [Overmind](README.md)
4-
* [Install](install.md)
5-
* [Create an app](create-an-app.md)
6-
* [Connect to a view](connect-to-a-view/README.md)
7-
* [React](connect-to-a-view/react.md)
8-
* [Vue](connect-to-a-view/vue.md)
9-
* [Other views](connect-to-a-view/other-views.md)
4+
* [Get started](get-started.md)
105
* [Devtools](devtools.md)
116
* [Side effects](untitled.md)
127
* [Namespacing](namespacing.md)
138
* [Organizing apps](organizing-apps.md)
9+
* [API](api/README.md)
10+
* [action](api/action.md)
1411

api/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# API
2+

api/action.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# action
2+
3+
### map
4+
5+
yeah
6+
7+
### mutation
8+
9+
yeah
10+
11+
### do
12+
13+
yeah
14+
15+
### debounce
16+
17+
yeah
18+
19+
### when
20+
21+
yeah
22+
23+
### fork
24+
25+
yeah
26+
27+
28+

connect-to-a-view/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

connect-to-a-view/other-views.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

connect-to-a-view/react.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

connect-to-a-view/vue.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

create-an-app.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)