Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling setState while Paywall is being presented causes paywall to close on iOS #1123

Open
kjossendal opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kjossendal
Copy link

Describe the bug
A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

  1. Environment
    1. Platform: iOS
    2. SDK version: 8.2.1
    3. OS version:
    4. Xcode/Android Studio version: Expo managed
    5. React Native version: 0.74.5
    6. SDK installation (CocoaPods + version or manual): cocoapods
    7. How widespread is the issue. Percentage of devices affected. All
  2. Debug logs that reproduce the issue: No logs provided
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context
If I present the paywall from a modal that is triggered by a setState mutation, then want to close that modal while presenting the paywall, the paywall either opens and immediately closes or never opens to begin with.

const closeModalAndShowPaywall = () => {
    setIsModalShowing(false)     <-- setting state
    const paywallResult: PAYWALL_RESULT = await RevenueCatUI.presentPaywall({
      fontFamily: "Roboto",
    });
}
@kjossendal kjossendal added the bug Something isn't working label Nov 1, 2024
@RCGitBot
Copy link
Contributor

RCGitBot commented Nov 1, 2024

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants