Skip to content

Commit

Permalink
chore: session replay for rn (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Sep 20, 2024
1 parent 7e5aa72 commit 19407cd
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/example_rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-native": "0.73.2",
"react-native-device-info": "^10.12.0",
"react-native-navigation": "^7.37.2",
"posthog-react-native-session-replay": ">=0.0.1"
"posthog-react-native-session-replay": ">=0.1.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
34 changes: 34 additions & 0 deletions posthog-react-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
# Next

# 3.2.0 - 2024-09-19

## Changed

1. chore: default `captureMode` changed to `json`.
1. To keep using the `form` mode, just set the `captureMode` option to `form` when initializing the PostHog client.
2. chore: Session Replay for React-Native - Experimental support

Install Session Replay for React-Native:

```bash
yarn add posthog-react-native-session-replay
# or npm
npm i -s posthog-react-native-session-replay
```

Enable Session Replay for React-Native:

```js
export const posthog = new PostHog(
'apiKey...',
{
// ...
enableSessionReplay: true,
},
);
```

Or using the `PostHogProvider`

```js
<PostHogProvider
apiKey="apiKey..."
options={{
enableSessionReplay: true,
}}
>
```

# 3.1.2 - 2024-08-14

Expand Down
6 changes: 3 additions & 3 deletions posthog-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthog-react-native",
"version": "3.1.2",
"version": "3.2.0",
"main": "lib/posthog-react-native/index.js",
"files": [
"lib/"
Expand Down Expand Up @@ -33,7 +33,7 @@
"react-native": "^0.69.1",
"react-native-device-info": "^10.3.0",
"react-native-navigation": "^6.0.0",
"posthog-react-native-session-replay": ">=0.0.1"
"posthog-react-native-session-replay": ">=0.1.0"
},
"peerDependencies": {
"@react-native-async-storage/async-storage": ">=1.0.0",
Expand All @@ -44,7 +44,7 @@
"expo-localization": ">= 11.0.0",
"react-native-device-info": ">= 10.0.0",
"react-native-navigation": ">=6.0.0",
"posthog-react-native-session-replay": ">=0.0.1"
"posthog-react-native-session-replay": ">=0.1.0"
},
"peerDependenciesMeta": {
"@react-native-async-storage/async-storage": {
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3703,9 +3703,9 @@ camelcase@^6.0.0, camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001646:
version "1.0.30001660"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz#31218de3463fabb44d0b7607b652e56edf2e2355"
integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==
version "1.0.30001662"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz#3574b22dfec54a3f3b6787331da1040fe8e763ec"
integrity sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==

capture-exit@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -8597,10 +8597,10 @@ possible-typed-array-names@^1.0.0:
resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f"
integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==

posthog-react-native-session-replay@>=0.0.1:
version "0.0.12"
resolved "https://registry.yarnpkg.com/posthog-react-native-session-replay/-/posthog-react-native-session-replay-0.0.12.tgz#84a26f5b0decf804c240f23830ad858292141090"
integrity sha512-qd2jIbafqV+tTFqxgng3NU4AEaPdm9smCKJPfN+pzdcBxAjqLqS1Ro4eyE/U1IvE+7c+ktkqLexyNZN+POvcHg==
posthog-react-native-session-replay@>=0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/posthog-react-native-session-replay/-/posthog-react-native-session-replay-0.1.0.tgz#968358655aa836827973b59e805d7ca257be47d8"
integrity sha512-uGdG+P7X7dbQvy9tenHk4lKna0SaURzcLXO5XrtdepzerEu2B4OZbysSZGQhtg2LYeXCnheblzDJVMdS/5Nfgw==

prelude-ls@^1.2.1:
version "1.2.1"
Expand Down

0 comments on commit 19407cd

Please sign in to comment.