Installation

This SDK is the client half of your integration. Feed groups, ranking, permissions, push setup and bulk imports are configured from your backend with a server-side SDK or the REST API, and the token your app connects with has to be signed there too. See the server-side overview for what belongs there, starting with tokens and authentication.

Build with Stream CLI and Agent Skills

The Stream CLI and Agent Skills provide AI coding agents, such as Claude Code, Cursor, and Codex, with the tools and knowledge necessary to build apps with Stream.

Install the CLI and add the skills to your project:

curl -fsSL https://getstream.io/cli.sh | bash
getstream skills stream-react-native

Once installed, invoke it from your agent:

/stream Add Stream Feeds to my React Native app.

The /stream skill acts as a router, reading your request and dispatching it to the specialist skill. You can also invoke the /stream-react-native skill directly.

Stream Agent Skills can also be installed from skills.sh.

Install the SDK

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

Install the mandatory peer dependencies

npm install @react-native-community/netinfo
# or using yarn
yarn add @react-native-community/netinfo

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

The SDK can be used with both JavaScript and TypeScript.

Client configuration

import { useCreateFeedsClient } from "@stream-io/feeds-react-native-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,
  },
});

The timeout option is the per-request timeout in milliseconds (default 3000).

Custom headers

custom_headers are sent along with every API request:

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

const client = useCreateFeedsClient({
  apiKey,
  userData: { id: "adam" },
  tokenOrProvider: "<string token or token API call>",
  options: {
    custom_headers: {
      "x-stream-ext": "my-value",
    },
  },
});

custom_headers can't be used to overwrite the SDK's internal settings, and they apply to HTTP requests only, not to the WebSocket connection.

Supported React versions: >=17.0.0 Supported React Native versions: >=0.73.0 Supported Expo versions: >=51.0.0