invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
667 stars 135 forks source link

[🐛] Bug Report Title - No lazy loading on Flatlist #386

Closed aminta closed 1 year ago

aminta commented 1 year ago

What happened?

I render the ads as items in a but the API call to the ads start all at once, even if the Ad component in not still visible in the list; instead, I would like to start the API call only when the Ads is in view... Is it possible?

Platforms

Android and iOS

React Native Info

"react": "17.0.2",
"react-native": "0.66.5",
"react-native-google-mobile-ads": "^6.3.0",

Are your using Typescript?

package.json

{
  "name": "Test",
  "version": "0.0.1",
  dependecies": {
    "@bugfender/rn-bugfender": "^2.1.0",
    "@chartiful/react-native-chart-builder": "^0.1.8",
    "@chartiful/react-native-horizontal-bar-graph": "^0.1.2",
    "@didomi/react-native": "^1.7.0",
    "@eva-design/eva": "^2.1.1",
    "@formatjs/intl-datetimeformat": "^6.4.3",
    "@formatjs/intl-getcanonicallocales": "^2.0.5",
    "@formatjs/intl-locale": "^3.0.11",
    "@formatjs/intl-numberformat": "^8.3.3",
    "@formatjs/intl-pluralrules": "^5.1.8",
    "@gorhom/bottom-sheet": "^4.1.5",
    "@gorhom/portal": "^1.0.14",
    "@native-html/iframe-plugin": "^2.6.1",
    "@notifee/react-native": "^5.5.0",
    "@react-native-async-storage/async-storage": "^1.15.17",
    "@react-native-community/hooks": "^2.8.1",
    "@react-native-community/netinfo": "^8.3.0",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-firebase/analytics": "^14.12.0",
    "@react-native-firebase/app": "^14.12.0",
    "@react-native-firebase/crashlytics": "^14.12.0",
    "@react-native-firebase/messaging": "^14.12.0",
    "@react-native-firebase/perf": "^14.12.0",
    "@react-native-firebase/remote-config": "^14.7.0",
    "@react-native-picker/picker": "^2.4.8",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/elements": "^1.3.3",
    "@react-navigation/material-top-tabs": "^6.2.1",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "@reduxjs/toolkit": "^1.7.1",
    "@ui-kitten/components": "^5.1.1",
    "@ui-kitten/eva-icons": "^5.1.1",
    "@ui-kitten/template-ts": "^5.1.2",
    "babel-plugin-module-resolver": "^4.1.0",
    "country-state-city": "^3.1.2",
    "dayjs": "^1.11.0",
    "email-validator": "^2.0.4",
    "hex-to-rgba": "^2.0.1",
    "intl": "^1.2.5",
    "json5": "^2.2.1",
    "lodash": "^4.17.21",
    "lottie-ios": "3.4.0",
    "lottie-react-native": "5.1.4",
    "nanoid": "^3.3.1",
    "object-mapper": "^6.2.0",
    "patch-package": "^6.5.1",
    "react": "17.0.2",
    "react-intersection-observer": "^9.4.3",
    "react-native": "0.66.5",
    "react-native-animated-screen": "^1.1.1",
    "react-native-auto-height-image": "^3.2.4",
    "react-native-autoheight-webview": "^1.6.4",
    "react-native-date-picker": "^4.2.6",
    "react-native-device-info": "^10.2.0",
    "react-native-error-boundary": "^1.1.13",
    "react-native-exception-handler": "^2.10.10",
    "react-native-fast-image": "^8.5.11",
    "react-native-flipper": "^0.131.1",
    "react-native-gesture-handler": "^2.4.0",
    "react-native-get-random-values": "^1.7.2",
    "react-native-google-mobile-ads": "^6.3.0",
    "react-native-iap": "12.3.4",
    "react-native-idfa": "^4.1.0",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-lazyload": "^1.1.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-loading-spinner-overlay": "^3.0.1",
    "react-native-offline": "^6.0.0",
    "react-native-outbrain": "^1.4.0",
    "react-native-pager-view": "^5.4.11",
    "react-native-performance": "^2.1.0",
    "react-native-performance-flipper-reporter": "^2.0.0",
    "react-native-picker-select": "^8.0.4",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "^2.7.0",
    "react-native-reanimated-carousel": "^2.3.5",
    "react-native-render-html": "^6.3.4",
    "react-native-restart": "^0.0.24",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.13.1",
    "react-native-share": "^7.4.1",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-splash-screen": "^3.3.0",
    "react-native-startup-time": "^2.0.0",
    "react-native-svg": "^13.6.0",
    "react-native-svg-charts": "^5.4.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-tracking-transparency": "^0.1.1",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-uuid": "^2.0.1",
    "react-native-webview": "^11.23.1",
    "react-native-zscrollview": "github:azwar/ZScrollView",
    "react-redux": "^7.2.6",
    "redux-flipper": "^2.0.1",
    "redux-persist": "^6.0.0",
    "rn-flipper-async-storage-advanced": "^1.0.4",
    "shortid": "^2.2.16",
    "ts-jest": "^29.0.3",
    "use-state-if-mounted": "^1.0.4",
    "victory-native": "^36.3.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/color": "^3.0.3",
    "@types/jest": "^29.2.2",
    "@types/react-native": "^0.66.4",
    "@types/react-native-push-notification": "^8.1.0",
    "@types/react-native-snap-carousel": "^3.8.5",
    "@types/react-native-svg-charts": "^5.0.12",
    "@types/react-native-video": "^5.0.12",
    "@types/react-test-renderer": "^17.0.1",
    "@typescript-eslint/eslint-plugin": "^5.7.0",
    "@typescript-eslint/parser": "^5.7.0",
    "@ui-kitten/metro-config": "^5.1.2",
    "babel-jest": "^29.2.2",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "eslint": "^7.14.0",
    "husky": "^3.0.0",
    "jest": "^29.2.2",
    "lint-staged": "^9.1.0",
    "metro-react-native-babel-preset": "^0.66.2",
    "react-test-renderer": "17.0.2",
    "ts-jest": "^29.0.3",
    "typescript": "^4.4.4"
  },
  "resolutions": {
    "@types/react": "^17",
    "react-native/@jest/create-cache-key-function": "^29.2.1"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": [
      "eslint --fix",
      "git add"
    ]
  }
}

app.json

{
  "name": "SportsNetwork",
  "displayName": "SportsNetwork",
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-2839575397058451~2489405429",
    "ios_app_id": "ca-app-pub-6391834239136103~1862709029",
    "delay_app_measurement_init": false,
    "user_tracking_usage_description": "This identifier will be used to deliver personalized ads to you."
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.