Hello guys,
I am fairly new to RevenueCat and attempting to integrate paywalls into my app using react-native-purchases-ui. I want to set up a Freemium model where the user can be to remove ads or watch a rewarded ad to move on. I am just trying to work out the flow to enable this.
So far my plan for potential implementation, I have a button within the WYSIWYG editor that navigates to a deep link within the app that triggers the reward ad to show, I however need to also dismiss the paywall on this action. There doesn’t seem to be any way to programatically close or abort the paywall? Or alternatively perform both a deep link action and dismiss action through a button within the paywall?
Is there any way to achieve this flow that I am missing or do I need to reach for manual implementation of the paywall and loose the benefits of your paywalls feature?
Page 1 / 1
Hi
- Instead of using presentPaywall, use the full RevenueCatUI.Paywall component
- Set a global boolean that controls whether the component is rendered
- When your deep link is triggered and the user is taken to your ad, listen to your deep link handler and change the boolean value, which should remove the paywall component from your tree.
Let me know if this makes sense and if you’re able to make this work. Thanks again for the feedback!
Thank you, I was able to get it to work using the JSX component version and conditionally rendering it.
<RevenueCatUI.Paywall
onDismiss={() => {
setShowPaywall(false);
}}
></RevenueCatUI.Paywall>
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.