This documentation guides you through setting up and implementing the React Native and React Web SDK.
Installing and Importing Packages
The React Native SDK consists of two packages:
- React Native: For applications using the React Native framework
- Common: Methods and constants shared between the React Native and Web packages
To install the SDK packages, complete the following steps:
- Set the default Artifactory npm registry using the following command:
npm config set @personalization-js-sdk:registry https://monetate.jfrog.io/artifactory/api/npm/monetate-npm-local
- Install the desired SDK packages.
npm install @personalization-js-sdk/react-native --legacy-peer-deps
npm install @personalization-js-sdk/common --legacy-peer-deps
To initialize an object to communicate with the Engine API, use the following code:
const sdkInstace = new Personalization(account, user);