@eduzz/csat-react-native
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Eduzz CSAT Mobile

npm install --save @eduzz/csat-react-native

Needs expo-store-review installed to open the in 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>);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @eduzz/csat-react-native

Weekly Downloads

15

Version

0.0.2

License

MIT

Unpacked Size

31.2 kB

Total Files

56

Last publish

Collaborators

  • danieloprado
  • caferrari
  • miguelaugl
  • luanlmd
  • vitorvmrs
  • jcrjunior