@originallyus/feedback-rn-sdk 4.0.0-beta.13 → 4.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,11 +6,9 @@ A cross-platform Feedback component for React Native.
|
|
|
6
6
|
|
|
7
7
|
Scan the QR code below with **Expo Go** (Android) or the **Camera app** (iOS) to try the latest SDK features:
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
|
-
[👉 Try on Expo Dev](https://expo.dev/preview/update?message=Demo+
|
|
12
|
-
|
|
13
|
-
---
|
|
11
|
+
[👉 Try on Expo Dev](https://expo.dev/preview/update?message=Demo+sdk&updateRuntimeVersion=1.0.0&slug=exp&projectId=64be1f70-2b29-479e-8c0a-ee495f737d06&group=039531ad-99df-4480-a9f7-5856bef92096)
|
|
14
12
|
|
|
15
13
|
## 📦 Installation
|
|
16
14
|
|
|
@@ -68,6 +66,9 @@ The SDK works best with **Spoqa Han Sans Neo** or **OpenSans**. Please ensure yo
|
|
|
68
66
|
Mount the `FeedbackSDK` component at the root of your application (typically in `App.tsx`). It should be at the bottom of your root view tree to stay on top of other views.
|
|
69
67
|
|
|
70
68
|
```tsx
|
|
69
|
+
import {useRef} from 'react'
|
|
70
|
+
import {View} from 'react-native'
|
|
71
|
+
import {SafeAreaProvider} from 'react-native-safe-area-context'
|
|
71
72
|
import {FeedbackSDK, type FeedbackSDKRef} from '@originallyus/feedback-rn-sdk'
|
|
72
73
|
|
|
73
74
|
export default function App() {
|
|
@@ -106,10 +107,10 @@ You can trigger a feedback form from anywhere in your app using the `ref`.
|
|
|
106
107
|
|
|
107
108
|
```tsx
|
|
108
109
|
// Show a specific form by slug
|
|
109
|
-
feedbackRef.current
|
|
110
|
+
feedbackRef.current.show('native_rating_form')
|
|
110
111
|
|
|
111
112
|
// Hide the form
|
|
112
|
-
feedbackRef.current
|
|
113
|
+
feedbackRef.current.hide()
|
|
113
114
|
```
|
|
114
115
|
|
|
115
116
|
---
|
|
@@ -177,10 +178,10 @@ The SDK dynamically renders UI based on the configuration of the form slug in th
|
|
|
177
178
|
|
|
178
179
|
```tsx
|
|
179
180
|
// Trigger NPS survey
|
|
180
|
-
feedbackRef.current
|
|
181
|
+
feedbackRef.current.show('nps-1')
|
|
181
182
|
|
|
182
183
|
// Trigger Satisfaction survey
|
|
183
|
-
feedbackRef.current
|
|
184
|
+
feedbackRef.current.show('native_rating_form')
|
|
184
185
|
```
|
|
185
186
|
|
|
186
187
|
---
|
package/package.json
CHANGED