Skip to content

Commit

Permalink
feat: react native SSE docs (#788)
Browse files Browse the repository at this point in the history
* feat: react native SSE docs

* fix: revert wizard changes

* Update docs/sdk/client-side-sdks/react-native/react-native-expo-install.md

Co-authored-by: Kaushal Kapasi <91074031+kaushalkapasi@users.noreply.github.com>

---------

Co-authored-by: Kaushal Kapasi <91074031+kaushalkapasi@users.noreply.github.com>
  • Loading branch information
jonathannorris and kaushalkapasi authored Dec 13, 2024
1 parent 76e45a5 commit ffd8f29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ Install the SDK dependencies, run the following command
### npx

```bash
npx expo install @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info
npx expo install @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info react-native-sse
```

### yarn

```bash
yarn expo install @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info
yarn expo install @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info react-native-sse
```

## Install Pods
Expand All @@ -58,6 +58,7 @@ npx pod-install
The [@react-native-async-storage/async-storage](https://www.npmjs.com/package/@react-native-async-storage/async-storage) package provides the ability to leverage on Device Storage that is used for caching by the SDK.
The [react-native-get-random-values](https://www.npmjs.com/package/react-native-get-random-values) package provides a polyfill for cryptographic functionality used to generate random IDs.
The [react-native-device-info](https://www.npmjs.com/package/react-native-device-info) package provides information about the current device running the SDK, which is required to correctly apply targeting rules.
The [react-native-sse](https://www.npmjs.com/package/react-native-sse) package provides SSE connection functionality to enable real-time updates.

[//]: # (wizard-initialize-start)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ Install the SDK dependencies, run the following command
### npm

```bash
npm install --save @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info
npm install --save @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info react-native-sse
```

### yarn

```bash
yarn add @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info
yarn add @react-native-async-storage/async-storage react-native-get-random-values react-native-device-info react-native-sse
```

## Install Pods
Expand All @@ -58,6 +58,7 @@ npx pod-install
The [@react-native-async-storage/async-storage](https://www.npmjs.com/package/@react-native-async-storage/async-storage) package provides the ability to leverage on Device Storage that is used for caching by the SDK.
The [react-native-get-random-values](https://www.npmjs.com/package/react-native-get-random-values) package provides a polyfill for cryptographic functionality used to generate random IDs.
The [react-native-device-info](https://www.npmjs.com/package/react-native-device-info) package provides information about the current device running the SDK, which is required to correctly apply targeting rules.
The [react-native-sse](https://www.npmjs.com/package/react-native-sse) package provides SSE connection functionality to enable real-time updates.

[//]: # (wizard-initialize-start)

Expand Down
6 changes: 6 additions & 0 deletions docs/sdk/client-side-sdks/react-native/react-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ The React Native SDK is available as a package on npm. A separate React Native E

This SDK is compatible with _React Native_ version 0.64.0 and above.

:::warning

If you are using [Flipper](https://fbflipper.com/) with React Native versions below `0.75.0`, SSE connections (which power real-time updates) will not work on Android unless Flipper is disabled. See [this issue](https://github.com/binaryminds/react-native-sse/issues/61) for more information.

:::

## React Native Web

To get your React Native Web working with DevCycle, you will need to change one of the rules in the webpack config to include `.cjs` files as one of the file types to be transpiled, e.g.:
Expand Down

0 comments on commit ffd8f29

Please sign in to comment.