iaphub / react-native-iaphub

The easiest way to implement IAP (In-app purchase) in your React Native app.
https://www.iaphub.com/
MIT License
319 stars 21 forks source link

Getting TypeError: IAPHub.init is not a function #51

Closed devaar100 closed 3 years ago

devaar100 commented 3 years ago

"react-native": "^0.63.2", "react-native-iap": "5.1.3", "react-native-iaphub": "^6.0.5",

Code import * as IAPHub from 'react-native-iaphub' import { useDispatch } from 'react-redux'

const init = async () => { await IAPHub.init({ appId: "id", apiKey: "key", environment: "production" }) }

I'll be really thankful if someone can help me out with this

iaphub commented 3 years ago

Hi @devaar100,

I think your issue is that you should the IAPHUB library like that: import Iaphub from 'react-native-iaphub';