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

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. #577

Open
adarshkhatri opened this issue May 19, 2021 · 0 comments

Comments

@adarshkhatri
Copy link

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check your code at MyScreens.js:194.
in MyScreens(created by SceneView)

And 194 line of MyScreens:

import * as WebBrowser from 'expo-web-browser';
import React, { PureComponent } from 'react';
import {AdMobBanner} from "react-native-admob";

export default class MyScreens extends PureComponent {

    render() {
    <AdMobBanner //line 194
                    adSize="fullBanner"
                    adUnitID="ca-app-pub-xxxx/xxx"
                    //testDevices={[AdMobBanner.simulatorId]}
                    onAdFailedToLoad={error => console.log(error)} />
    }
}

As soon as I remove <AdMobBanner..... /> then the app loads fine.

What is triggering the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant