npm install --save @eduzz/csat-react-native
Needs
expo-store-review
installed to open thein app review
otherwise will open the store.
import { CsatProvider, csatTrigger } from '@eduzz/csat-react-native';
export function App() {
return (
<CsatProvider
user={{
authToken: 'orbita_1234',
userId: '67177',
userEmail: 'qa-orbita@eduzz.com',
userMetadata: { batata: 'frita' } // optional
}} // can be pass null
storeReview={{
appStoreId: '982107779',
googlePlayId: 'host.exp.exponent'
}}
apiUrl='http://192.168.1.103:5000' // optional
onError={console.error} // all error will be ignored if you wont pass onError
>
{/* your app code */}
</CsatProvider>
);
}
// Call csatTrigger to open the feedback according with the current campaign
function MyAppComponent() {
return (<Button onPress={() => csatTrigger('trigger-1', 'Trigger 1')}>Trigger 1</Button>);
}