Migrating to 10.0.0
Migrating to 10.0.0
Starting with 10.0.0, the parameters to some of the methods are now objects instead of positional parameters.
Before
getProducts(['my_sku']);
After
getProducts({skus: ['my_sku']});
Methods are now exported outside of the main module:
Before
import IAP from 'react-native-iap'
...
IAP.requestPurchase(...)
After
import {requestPurchase} from 'react-native-iap';
...
requestPurchase(...)
If you want to import keeping the namespace, use:
import * as IAP from 'react-native-iap'
...
IAP.requestPurchase(...)