Installation

npm install @stream-io/feeds-react-sdk
# or using yarn
yarn add @stream-io/feeds-react-sdk

GitHub repository: https://github.com/GetStream/stream-feeds-js. Feel free to submit bug reports and feature requests.

The package can be used with both JavaScript and TypeScript.

import { useCreateFeedsClient } from "@stream-io/feeds-react-sdk";

const client = useCreateFeedsClient({
  apiKey,
  userData: {
    id: "adam",
    // Optional data
    name: "Adam",
    image: "url/to/profile/picture",
  },
  tokenOrProvider: "<string token or token API call>",
  // Optional
  options: {
    timeout: 5000,
  },
});

Supported React versions: 17 || 18 || 19