react-activity-feed
Version:
React components to create activity and notification feeds
31 lines (24 loc) • 1.1 kB
text/mdx
route: /
This library provides components that interact with Stream's APIs.
In order to use the components you need to have an account and you need to nest
the components that interact with feeds inside the `<StreamApp>` element which
you must configure with the correct API key, app ID and token.
```js static
<StreamApp apiKey={apiKey} appId={appId} token={token}>
<FlatFeed />
</StreamApp>
```
You can find the API key and app ID on the
[dashboard for your app](https://getstream.io/dashboard/).
The token needs to be generated by your backend and is unique for each user of
the website.
How to generate it is explained in
[the normal Stream docs](https://getstream.io/docs/#frontend_setup).
### Current user and defaults
The token contains the user id of the user that uses your application. Because
of this, all components will automatically use that user id as the default for
rendering feeds, adding activities and reactions such as comments and likes.
**Note:** most top level components like the `FlatFeed`, come with common
default prop values (e.g. userId, feedGroup, ...).