Skip to content

Commit 6d0c877

Browse files
authored
update flow images
1 parent 8725c37 commit 6d0c877

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ npm install react-most --save
1818
`react-most` is simple and only 100 LOC React Higher Order Component. only depends on most and react.
1919

2020
data flow is simple and one way only
21-
![](https://raw.githubusercontent.com/jcouyang/react-most/master/docs/images/flow.dot.png)
21+
22+
![](https://github.com/reactive-react/react-most/wiki/images/react-most-flow.png)
2223

2324
## Terminology
2425
- **Action**: a action can create a Intent and send to `Intent Stream`
@@ -31,9 +32,15 @@ data flow is simple and one way only
3132
sorry we don't have a **book** to document how to use `react-most`, and I don't really need to, but
3233
there's only 3 things you should notice when using `react-most`, I'll explain by a simple counter app.
3334

34-
also you can refer to various of [Examples](https://github.com/reactive-react/react-most/wiki/examples.md) and it's simple [API](https://github.com/reactive-react/react-most/wiki/api.md)
35+
also you can refer to
36+
37+
- various of [Examples](https://github.com/reactive-react/react-most/wiki/examples.md)
38+
- simple [API](https://github.com/reactive-react/react-most/wiki/api.md)
39+
- [Wiki](https://github.com/reactive-react/react-most/wiki)
40+
3541

3642
### 1. Create a simple statless component
43+
![](https://github.com/reactive-react/react-most/wiki/images/view.png)
3744
```html
3845
const CounterView = props => (
3946
<div>
@@ -44,6 +51,8 @@ const CounterView = props => (
4451
)
4552
```
4653
### 2. Define Counter's Behaviour
54+
![](https://github.com/reactive-react/react-most/wiki/images/behavior.png)
55+
4756
1. a counter can have actions of `inc` and `dec`, which will send a objec `{type: 'inc'}` or `{type:'dec'}` to `Intent Stream` if it's been call
4857
2. a counter reactivly generate state transform function when recieve intent of type `inc` or `dec`.
4958
```js
@@ -65,7 +74,7 @@ const counterable = connect((intent$) => {
6574
})
6675
```
6776
### 3. connect behaviour and view
68-
77+
![](https://github.com/reactive-react/react-most/wiki/images/wrap.png)
6978
```js
7079
const Counter = counterable(CounterView)
7180

0 commit comments

Comments
 (0)