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

onLogin is undefined #1

Open
clucasalcantara opened this issue Jun 14, 2017 · 3 comments
Open

onLogin is undefined #1

clucasalcantara opened this issue Jun 14, 2017 · 3 comments

Comments

@clucasalcantara
Copy link

Using this, on a react-native:

renderLogin() {
        const onLogin = (email, password) => {
            console.log(email, password) // user credentials
        }
        
        const onResetPassword = (email) => {
            console.log(email)
        }
        
        return (
            <Login
                onLogin={onLogin}
                onResetPassword={onResetPassword}
            />
        );
    }

The component warns me against the onLogin undefined :/, any idea?

@cmelgarejo
Copy link

cmelgarejo commented Jun 25, 2017

Maybe you should use:

<Login
       onLogin={this.onLogin}
       onResetPassword={this.onResetPassword}
/>

since you are defining those inside the component definition

@clucasalcantara
Copy link
Author

I've tried, but the same error appears :/, I'll probably missing something on the component definition.

@chagasaway
Copy link

Hey @clucasalcantara, sorry for the delay...

I just tested the library on a brand new React Native App (created by create-react-native-app), and everything worked fine here.

I created a gist with the main application file (https://gist.github.com/chagasaway/39bfd15d03a08b8213337cd627c8e83a) that shows how I have integrated the library.

Can you test it or tell me if anything is different on your side?

Best regards,
Fellipe

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

3 participants