Skip to content

Commit 13a378f

Browse files
committed
[add] Action example to readme
1 parent adb0606 commit 13a378f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ all state encapsulated in one place. This design seeks to achieve a
1010
reasonable trade off between the simplicity of singletons and the
1111
privacy of class instances.
1212

13+
---
14+
1315
[![Circle CI](https://circleci.com/gh/vigetlabs/microcosm.svg?style=svg)](https://circleci.com/gh/vigetlabs/microcosm)
1416

17+
---
18+
1519
## Overview
1620

1721
Within the context of the Flux model, Microcosm treats actions and
@@ -20,7 +24,11 @@ stores as singletons, however they do not contain any state.
2024
Actions are called within the context of a particular instance of Microcosm:
2125

2226
```javascript
23-
app.push(Action, parameters)
27+
let Action = function(params) {
28+
return params
29+
}
30+
31+
app.push(Action, params)
2432
```
2533

2634
Stores hold no state. Stores are collections of functions that transform

0 commit comments

Comments
 (0)