I am trying to implement a referral system in a React Native Android app, using the react-native-install-referrer package, with the following code:
import RNInstallReferrer from 'react-native-install-referrer';
const handleReferrer = async () =>
try {
const referrer = await RNInstallReferrer.getReferrer();
} catch (e) {
console.log(e)}
}
}
It fails with this error:
Cannot read properties of undefined (reading 'getReferrer') while using react-native-install-referrer
What I am I doing wrong?