You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-93Lines changed: 7 additions & 93 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ description: frictionless state management
8
8
9
9
## APPLICATION INSIGHT
10
10
11
-
Develop the application state, effects and actions without leaving [VS Code](https://code.visualstudio.com/), or use the standalone development tool. Everything that happens in your app is tracked and you can seamlessly code and run logic to verify that everything works as expected without necessarily having to implement UI.
11
+
Develop the application state, effects and actions without leaving [VS Code](https://code.visualstudio.com/), or use the standalone development tool. Everything that happens in your app is tracked and you can seamlessly code and run logic to verify that everything works as expected without having to implement UI.
12
12
13
13

14
14
15
15
## A SINGLE STATE TREE
16
16
17
-
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.
17
+
Building your application as 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.
18
18
19
19
```typescript
20
20
{
@@ -32,26 +32,15 @@ Building your application with a single state tree is the most straight forward
32
32
33
33
Separate 3rd party APIs and logic not specific to your application by using **effects**. This will keep your application logic pure and without low level APIs cluttering your code.
Even though Overmind can create applications with only plain **state** and **actions**, you can use **opt-in** tools like**functional operators**, **statecharts** and state values defined as a **class,** to manage complexities of your application.
59
+
When pieces of logic become complex it is beneficial to write functional code. Overmind provides an API named**operators** which gives you functional power. Ignore it, use it where it makes sense or make your whole codebase functional. It is up to you!
this.validationError='You need some numbers in your password'
143
-
}
144
-
this.password=password
145
-
}
146
-
isValid() {
147
-
return Boolean(this.username && this.password)
148
-
}
149
-
}
150
-
151
-
typeState= {
152
-
loginForm: LoginForm
153
-
}
154
-
155
-
exportconststate: State= {
156
-
loginForm: newLoginForm()
157
-
}
158
-
```
159
-
{% endtab %}
160
-
{% endtabs %}
161
75
162
76
## SNAPSHOT TESTING OF LOGIC
163
77
@@ -188,5 +102,5 @@ Overmind has you covered on typing. If you choose to use Typescript the whole AP
188
102
189
103

190
104
191
-
Overmind is running the main application of [codesandbox.io](https://codesandbox.io). Codesandbox, with its state and effects complexity, benefits greatly combining Overmind and Typescript.
105
+
Overmind is running the main application of [codesandbox.io](https://codesandbox.io). With its state and effects complexity Codesandbox benefits greatly by Overmind using Typescript.
Copy file name to clipboardExpand all lines: introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,7 +329,7 @@ Our todo has been added and we can even see how the derived state was affected b
329
329
330
330
## Managing complexity
331
331
332
-
Overmind gives you a basic foundation with its **state**, **actions** and **effects**. As mentioned previously you can split these up into multiple namespaces to organize your code. This manages the complexity of scaling. There is also a complexity of reusability and managing execution over time. The **operators** API allows you to split your logic into many different composable parts. With operators like **debounce**, **waitUntil** etc. you are able to manage execution over time. With the latest addition of **statecharts** you have the possiblity to manage the complexity of state and interaction. What interactions should be allowed in what states.
332
+
Overmind gives you a basic foundation with its **state**, **actions** and **effects**. As mentioned previously you can split these up into multiple namespaces to organize your code. This manages the complexity of scaling. There is also a complexity of reusability and managing execution over time. The **operators** API allows you to split your logic into many different composable parts. With operators like **debounce**, **waitUntil** etc. you are able to manage execution over time. With the latest addition of **statecharts** you have the possiblity to manage the complexity of state and interaction. What interactions should be allowed in what states. And with state values as **class instances** you are able to co-locate state with logic.
333
333
334
334
The great thing about Overmind is that none of these concepts are forced upon you. If you want to build your entire app in the root namespace, only using actions, that is perfectly fine. You want to bring in operators for a single action to manage time complexity, do that. Or do you have a concept where you want to safely control what actions can run in certain states, use a statechart. Overmind just gives you tools, it is up to you to determine if they are needed or not.
0 commit comments