Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
古映杰 committed Jun 8, 2018
1 parent 5877b2c commit 6dac2b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -82,6 +82,7 @@ render(<App />, document.getElementById('root'))
* [data fetching](#data-fetching)
* [loading](#loading)
* [code-spliting](#code-spliting)
* [animation][#animation]

## reactive element

Expand Down
4 changes: 2 additions & 2 deletions doc/api.md
Expand Up @@ -225,13 +225,13 @@ import {
} from 'rxjs-react/operators'
```

### toReactComponent -> observable -> (render: (value, props) -> ReactElement) -> ReactComponent
### toReactComponent -> observable -> ((value, props) -> ReactElement) -> ReactComponent

`toReactComponent` can make `observable` to be `ReactComponent`, it receives a render function which has two arguments, the first one is value from `observable`, the second one is props from `ReactComponent`

[click to see reactive demo](https://codesandbox.io/s/rmkwjx0rrq)

### toReactiveComponent -> observable -> (render: (value, props) -> ReactElement|observable) -> ReactComponent
### toReactiveComponent -> observable -> ((value, props) -> ReactElement|observable) -> ReactComponent

`toReactiveComponent` is similar to `toReactComponent`, except it supports write `observable` in `render` function.

Expand Down

0 comments on commit 6dac2b9

Please sign in to comment.