diff --git a/dist/AdmobBanner.js b/dist/AdmobBanner.js index 0477f7c..40393c4 100644 --- a/dist/AdmobBanner.js +++ b/dist/AdmobBanner.js @@ -8,7 +8,7 @@ const AdmobBanner = ({ style, onSizeChange, onAdFailedToLoad, ...res }) => { loadBanner(); }); const loadBanner = () => { - UIManager.dispatchViewManagerCommand(findNodeHandle(_bannerView), UIManager.getViewManagerConfig("RNGADBannerView").Commands + UIManager.dispatchViewManagerCommand(findNodeHandle(_bannerView.current), UIManager.getViewManagerConfig("RNGADBannerView").Commands .loadBanner, undefined); }; const handleSizeChange = (event) => { diff --git a/src/AdmobBanner.tsx b/src/AdmobBanner.tsx index 1bb9de4..547cfbc 100644 --- a/src/AdmobBanner.tsx +++ b/src/AdmobBanner.tsx @@ -34,7 +34,7 @@ const AdmobBanner: FC = ({ const loadBanner = () => { UIManager.dispatchViewManagerCommand( - findNodeHandle(_bannerView), + findNodeHandle(_bannerView.current), UIManager.getViewManagerConfig("RNGADBannerView").Commands .loadBanner, undefined