-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat(hooks)!: automatically set isLoaded to false #199
feat(hooks)!: automatically set isLoaded to false #199
Conversation
When ad is opened, automatically set `isLoaded` to false because `show` cannot be called.
I have the same issue. |
I think we should set isLoaded to false upon closing the ad. |
I agree. It was weird behavior. Let's make it change, but it's a breaking change, so we will have to increase major version. |
Codecov Report
@@ Coverage Diff @@
## main #199 +/- ##
=======================================
Coverage 22.59% 22.59%
=======================================
Files 34 34
Lines 806 806
Branches 199 199
=======================================
Hits 182 182
Misses 624 624 |
Thanks for your contribution! |
## [8.0.0](v7.0.1...v8.0.0) (2022-09-06) ### ⚠ BREAKING CHANGES * **hooks:** `isLoaded` becomes false after a fullscreen ad was shown. ### Features * **hooks:** automatically set isLoaded to false ([#199](#199)) ([9d0ecac](9d0ecac))
🎉 This PR is included in version 8.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [8.0.0](invertase/react-native-google-mobile-ads@v7.0.1...v8.0.0) (2022-09-06) ### ⚠ BREAKING CHANGES * **hooks:** `isLoaded` becomes false after a fullscreen ad was shown. ### Features * **hooks:** automatically set isLoaded to false ([#199](invertase/react-native-google-mobile-ads#199)) ([9d0ecac](invertase/react-native-google-mobile-ads@9d0ecac))
Description
I find it weird that
isLoaded
in hooks doesn't change value when ad is shown. In fact, the valueisLoaded = true
after ad has been shown is wrong since a new ad has not been loaded and callingshow
will fail.Related issues
Release Summary
Checklist
and followed the process outlined there for submitting PRs.
Android
iOS
My change includes tests;e2e
tests added or updated in__tests__e2e__
jest
tests added or updated in__tests__
I have updated TypeScript types that are affected by my change.Test Plan
I wanted to add some tests on
useRewardedAd
hook but I had this errorrewarded.test.tsx
And I had plan to test if calling
show
will setisLoaded
tofalse
.Think
react-native-google-mobile-ads
is great? Please consider supporting the project with any of the below:Invertase
on Twitter🔥