Skip to content

Commit

Permalink
improve documentation by using different method names instead of over…
Browse files Browse the repository at this point in the history
…loading (#2182)

Co-authored-by: Andres Aguilar <andres.aguilar@nfl.com>
  • Loading branch information
andresesfm and Andres Aguilar authored Jan 3, 2023
1 parent b66ce48 commit 9616926
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/docs/guides/purchases.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ class App extends Component {
Then define the method like below and call it when user press the button.

```tsx
import { requestSubscription, requestSubscription } from 'react-native-iap';
...
class App extends Component {
requestPurchase = async (sku: string) => {
purchase = async (sku: string) => {
try {
await requestPurchase({
sku,
Expand All @@ -112,7 +114,7 @@ class App extends Component {
}
};

requestSubscription = async (sku: string, offerToken: string?) => {
subscribe = async (sku: string, offerToken: string?) => {
try {
await requestSubscription(
{sku},
Expand Down

0 comments on commit 9616926

Please sign in to comment.