Skip to content

Commit c17f6e6

Browse files
christianalfonigitbook-bot
authored andcommitted
GitBook: [v26] 45 pages modified
1 parent cd77b5e commit c17f6e6

25 files changed

+2096
-761
lines changed

README.md

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: frictionless state management
66

77
> Web application development is about **defining**, **changing** and **consuming state** to produce a user experience. Overmind aims for a developer experience where that is all you focus on, reducing the orchestration of state management to a minimum. Making you a **happier** and more **productive** developer!
88
9-
{% embed url="https://overmindjs.changefeed.app/general/v22.0.0" %}
9+
{% embed url="https://overmindjs.changefeed.app/general/v26" %}
1010

1111
## APPLICATION INSIGHT
1212

@@ -16,7 +16,7 @@ Develop the application state, effects and actions without leaving [VS Code](htt
1616

1717
## A SINGLE STATE TREE
1818

19-
Building your application with a single state tree is the most straight forward mental model. You get a complete overview, but can still organize the state by namespacing it into domains. The devtools allows you to edit and mock out state.
19+
Building your application with a single state tree is the most straight forward mental model. You get a complete overview, but can still organize the state by namespacing it into domains. This gives you the benefit of being able to explore all the state of your application from a single point. With Typescript it is even documented. The devtools allows you to edit and mock out state.
2020

2121
```typescript
2222
{
@@ -57,7 +57,7 @@ export const loadApp = ({ state, effects }) => {
5757

5858
## SAFE AND PREDICTABLE CHANGES
5959

60-
When you build applications that perform many state changes things can get out of hand. In Overmind you can only perform state changes from **actions** and all changes are tracked by the development tool.
60+
When you build applications that perform many state changes things can get out of hand. In Overmind you can only perform state changes from **actions** and all changes are tracked by the development tool. Even effects are tracked and reactions are tracked.
6161

6262
```javascript
6363
export const getItems = async ({ state, effects }) => {
@@ -69,7 +69,7 @@ export const getItems = async ({ state, effects }) => {
6969

7070
## COMPLEXITY TOOLS
7171

72-
Even though Overmind can create applications with only plain **state** and **actions**, you can use **opt-in** tools like **functional operators**, **statecharts, statemachines** and state values defined as a **class,** to manage complexities of your application.
72+
Even though Overmind can create applications with plain **state** and **actions**, you can use **opt-in** tools like **functional operators**,**, statemachines** and state values defined as a **class,** to manage complexities of your application.
7373

7474
{% tabs %}
7575
{% tab title="Operators" %}
@@ -89,54 +89,18 @@ export const search = pipe(
8989
```
9090
{% endtab %}
9191

92-
{% tab title="Statechart" %}
93-
```javascript
94-
const loginChart = {
95-
initial: 'LOGIN',
96-
states: {
97-
LOGIN: {
98-
on: {
99-
changeUsername: null,
100-
changePassword: null,
101-
login: 'AUTHENTICATING'
102-
}
103-
},
104-
AUTHENTICATING: {
105-
on: {
106-
resolveUser: 'AUTHENTICATED',
107-
rejectUser: 'ERROR'
108-
}
109-
},
110-
AUTHENTICATED: {
111-
on: {
112-
logout: 'LOGIN'
113-
}
114-
},
115-
ERROR: {
116-
on: {
117-
tryAgain: 'LOGIN'
118-
}
119-
}
120-
}
121-
}
122-
```
123-
{% endtab %}
124-
12592
{% tab title="Statemachines" %}
12693
```typescript
127-
export const state = {
128-
mode: statemachine({
129-
initial: 'unauthenticated',
130-
states: {
131-
unauthenticated: ['authenticating'],
132-
authenticating: ['unauthenticated', 'authenticated'],
133-
authenticated: ['unauthenticating'],
134-
unauthenticating: ['unauthenticated', 'authenticated']
135-
}
136-
}),
94+
export const state = statemachine({
95+
unauthenticated: ['authenticating'],
96+
authenticating: ['unauthenticated', 'authenticated'],
97+
authenticated: ['unauthenticating'],
98+
unauthenticating: ['unauthenticated', 'authenticated']
99+
}, {
100+
state: 'unauthenticated',
137101
user: null,
138102
error: null
139-
}
103+
})
140104
```
141105
{% endtab %}
142106

SUMMARY.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* [Actions](core/writing-application-logic.md)
1616
* [Effects](core/running-side-effects.md)
1717
* [Operators](core/going-functional.md)
18-
* [Statecharts](core/statecharts.md)
1918
* [Server Side Rendering](core/server-side-rendering.md)
2019
* [Typescript](core/typescript.md)
2120

@@ -24,19 +23,22 @@
2423
* [React](views/react.md)
2524
* [Angular](views/angular.md)
2625
* [Vue](views/vue.md)
26+
* [Svelte](views/svelte.md)
2727

2828
## Addons
2929

3030
* [GraphQL](addons/graphql.md)
31+
* [Statechart](addons/statecharts.md)
3132

3233
## Guides <a id="guides-1"></a>
3334

35+
* [Using state machines](guides-1/using-state-machines.md)
3436
* [Connecting components](guides-1/connecting-components.md)
35-
* [Connecting to React Native](https://dev.to/brasilikum/how-to-setup-overmind-with-react-native-expo-optional-4mk5)
3637
* [Managing lists](guides-1/managing-lists.md)
3738
* [State first routing](guides-1/state-first-routing.md)
3839
* [Move to Typescript](guides-1/move-to-typescript.md)
3940
* [Testing](guides-1/testing.md)
41+
* [Connecting to React Native](https://dev.to/brasilikum/how-to-setup-overmind-with-react-native-expo-optional-4mk5)
4042

4143
## API <a id="api-1"></a>
4244

@@ -46,8 +48,9 @@
4648
* [createOvermind](api-1/createovermind.md)
4749
* [createOvermindMock](api-1/createovermindmock.md)
4850
* [createOvermindSSR](api-1/createovermindssr.md)
49-
* [derive](api-1/derive.md)
51+
* [derived](api-1/derive.md)
5052
* [effects](api-1/effects.md)
53+
* [events](api-1/events.md)
5154
* [json](api-1/json.md)
5255
* [lazy](api-1/lazy.md)
5356
* [merge](api-1/merge.md)
@@ -56,5 +59,5 @@
5659
* [operators](api-1/operators.md)
5760
* [reaction](api-1/reaction.md)
5861
* [rehydrate](api-1/rehydrate.md)
59-
* [statecharts](api-1/statecharts.md)
62+
* [statemachine](api-1/statemachine.md)
6063

0 commit comments

Comments
 (0)