So paid pages in my app, when a user click to open any of these pages i want to run a function to check if the product is purchased and if it's not then buy the product, I have found two packages which are react-native-iap and expo-in-app-purchase but did not find clear instructions on how to achieve the process i need..
const paidPage = async (productId , navTo) => { // PASS THE PRODUCT ID AND A FUNCTION THAT NAVIGATE TO THE PAGE // HERE I WANT TO CHECK IF THE PRODUCT IS PURCHASED, IF YES THEN NAVIGATE TO THE PAGE// IF NO THEN PURCHASE THE PRODUCT }