This documentation guides you through setting up and implementing the React SDK.
You must have Node and Yarn installed to set up this SDK. Refer to the installation instructions for Node and Yarn for more information.
Installing and Importing Packages
The SDK consists of three packages:
- React Native: For applications using the React Native framework
- Common: Methods and constants shared between the other two packages
To install the SDK packages, complete the following steps:
- Set the default Artifactory npm registry using the following command:
npm config set @kibo-personalization-js-sdk:registry https://monetate.jfrog.io/artifactory/api/npm/kibo-npm-local
- Install the desired SDK packages using the following commands:
npm install @kibo-personalization-js-sdk/react-native
npm install @kibo-personalization-js-sdk/Web
npm install @kibo-personalization-js-sdk/common
To initialize an object to communicate with the Engine API, use the following code:
const sdkInstace = new KiboPersonalization(account, user, contextMap);
For a complete list of methods and objects you can use, refer to SDK API Reference.