Skip to content

Commit 5c06a7b

Browse files
Merge pull request cerebral#53 from cerebral/docs2
docs(website): add get started guide and fix some styling
2 parents d843bc4 + 6c043ed commit 5c06a7b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1035
-264
lines changed

logo.png

58.3 KB
Loading

logo.psd

366 KB
Binary file not shown.

packages/demos/posts/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "parcel src/index.html --port 4000",
8-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"start": "parcel src/index.html --port 4000"
98
},
109
"keywords": [],
1110
"author": "",

packages/overmind-website/api/action.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Action
22

33
```marksy
4-
<Example name="api_action" />
4+
<Example name="api/action" />
55
```
66

77
An action allows you to compose pieces of logic into an execution. You typically execute an action based on some user interaction in your application, but it could be everything from a route change to a websocket message as well.
@@ -12,7 +12,7 @@ The action is built up by **operators**, methods called on the action itself. Th
1212

1313
## debounce
1414
```marksy
15-
<Example name="api_action_debounce" />
15+
<Example name="api/action_debounce" />
1616
```
1717

1818
Typically used to only continue execution of the last action call if multiple action calls has been made in the time limit passed in.
@@ -21,7 +21,7 @@ The only argument is the time limit in milliseconds the operator should prevent
2121

2222
## do
2323
```marksy
24-
<Example name="api_action_do" />
24+
<Example name="api/action_do" />
2525
```
2626

2727
Typically used to fire off an effect without caring about its returned result, if any.
@@ -30,7 +30,7 @@ Only argument is a function that receives the **effects** registered in the appl
3030

3131
## filter
3232
```marksy
33-
<Example name="api_action_filter" />
33+
<Example name="api/action_filter" />
3434
```
3535

3636
Typically used to stop execution related to some condition.
@@ -39,7 +39,7 @@ The first argument is a function that receives the **effects** registered in the
3939

4040
## fork
4141
```marksy
42-
<Example name="api_action_fork" />
42+
<Example name="api/action_fork" />
4343
```
4444
Typically used to fork out execution when a value can result in multiple complex executions.
4545

@@ -48,7 +48,7 @@ The first argument is a function that receives the **effects** as the first argu
4848

4949
## map
5050
```marksy
51-
<Example name="api_action_map" />
51+
<Example name="api/action_map" />
5252
```
5353

5454
Typically used to get values from an effect or transform the current value of the action.
@@ -57,7 +57,7 @@ Only argument is a function that receives the **effects** registered in the appl
5757

5858
## mutation
5959
```marksy
60-
<Example name="api_action_mutation" />
60+
<Example name="api/action_mutation" />
6161
```
6262

6363
Used to change the state of the application.
@@ -66,7 +66,7 @@ Only argument is a function that receives the **state** as the first argument an
6666

6767
## try
6868
```marksy
69-
<Example name="api_action_try" />
69+
<Example name="api/action_try" />
7070
```
7171

7272
Typically used to explicitly handle potentially thrown errors from an effect.
@@ -75,7 +75,7 @@ The first argument is a function that receives the **effects** registered in the
7575

7676
## when
7777
```marksy
78-
<Example name="api_action_when" />
78+
<Example name="api/action_when" />
7979
```
8080

8181
Typically used to fork execution based on a thruthy or falsy value.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# App
22

33
```marksy
4-
<Example name="api_app_initialize" view />
4+
<Example name="api/app_initialize" view />
55
```
66

77
The **App** class is used to create the application instance. The instance itself exposes a **connect** function used to connect views to the state of the application and allow them to trigger actions.

packages/overmind-website/api/compute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compute
22

33
```marksy
4-
<Example name="api_compute" view/>
4+
<Example name="api/compute" view/>
55
```
66

77
You can add computed state values. These state values are functions that takes one argument, `filterNameBy` in the example above. This argument can be whatever you want, but it can only be a single argument. That means if you want to pass in multiple values you would pass those as part of an object. The reason computed state values work like this is because this argument is the cache key. As long as you pass in the same argument and the accessed state is not changed, the cached value is instantly returned.

packages/overmind-website/api/connect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Connect
22

33
```marksy
4-
<Example name="api_connect" view/>
4+
<Example name="api/connect" view/>
55
```
66

77
When you instantiate an Overmind application it exposes the ability to connect components to the state and actions defined. This is simply done by using the **connect** function and pass in the component.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Derive
22

33
```marksy
4-
<Example name="api_derive" view />
4+
<Example name="api/derive" view />
55
```
66

77
You can add derived state to your application. You access derived state like any other value, there is not need to call it as a function. The derived value is cached and will only update when any accessed state changes.
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
# Effects
1+
# Effects
2+
3+
```marksy
4+
<Example name="api/effects" />
5+
```
6+
7+
There is really no API with effects. You just expose existing libraries or create your own APIs for doing side effects. When these effects are attached to the application they will be tracked by the devtools giving you additional debugging information. By "injecting" the effects this way also opens up for easier testability of your logic.

packages/overmind-website/api/namespaced.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)