Updated create-subscription description

This commit is contained in:
Brian Vaughn 2018-03-14 15:39:38 -07:00
parent ccec542ad3
commit ced176edb7
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# create-subscription
`create-subscription` provides an async-safe interface to manage a subscription.
`create-subscription` is a utility for subscribing to external data sources inside React components. It is officially supported and maintained by the React team.
## When should you NOT use this?
@ -50,7 +50,7 @@ const Subscription = createSubscription({
});
```
To use the `Subscription` component, pass the subscribable property (e.g. an event dispatcher, Flux store, observable) as the `source` property and use a [render prop](https://reactjs.org/docs/render-props.html), `children`, to handle the subscribed value when it changes:
To use the `Subscription` component, pass the subscribable property (e.g. an event dispatcher, observable) as the `source` property and use a [render prop](https://reactjs.org/docs/render-props.html), `children`, to handle the subscribed value when it changes:
```js
<Subscription source={eventDispatcher}>

View File

@ -1,6 +1,6 @@
{
"name": "create-subscription",
"description": "HOC for creating async-safe React components with subscriptions",
"description": "utility for subscribing to external data sources inside React components",
"version": "0.1.0-alpha.2",
"repository": "facebook/react",
"files": [