The ReactNative wrapper for the IFTTT ConnectSDK.
npm install connectsdk-reactnative
import { ConnectButton } from 'connectsdk-reactnative';
// ...
<ConnectButton
connectionId={'<The Id of the connection that should be displayed. Example: >'}
suggestedUserEmail={'<An email address corresponding to the user that is logged in.>'}
redirectURL={'<The redirect URL to use when invoking your iOS app after a service is connected. Example: connectsdktestapp://connect_callback'}
skipConnectionConfiguration={false} // Whether or not connection configuration should be skipped.
onActivationSuccess={onActivationSuccess} // Callback for Connection activation success
onActivationFailure={onActivationFailure} // Callback for Connection activation failure
onDeactivationSuccess={onDeactivationSuccess} // Callback for Connection deactivation success
onDeactivationFailure={onDeactivationFailure} // Callback for Connection deactivation failure
/>
In order to see an example of the wrapper, you'll need the following dependencies:
- yarn
- npm
- Cocoapods
- Clone the repository
- Run
yarn
to setup yarn dependencies - Go to
example/ios
folder - Run
pod install
to setup Cocoapods for the example project. - Go back to root of the repository.
- Run
yarn example ios
to run the iOS app.
To see usage of the ConnectButton in Typescript, go to example/src/App.tsx
.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library