Our React Native SDK powered by the mycover.ai platform, for buying and managing insurance policies.
npm install --save @mycoverai/mca-react-native-sdk
npm install --dev react-native-svg-transformer
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const defaultConfig = getDefaultConfig(__dirname);
const {assetExts, sourceExts} = defaultConfig.resolver;
const config = {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};
module.exports = mergeConfig(defaultConfig, config);
- import the package into your js file
import McaSDK from "@mycoverai/mca-react-native-sdk"
- proceed to call the Mycover.ai component in your file
<McaSDK apiKey="<YOUR-MCA-API-KEY>" onComplete={() => console.log('done')} />