onLogin is undefined
Opened this issue · 3 comments
clucasalcantara commented
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 commented
Maybe you should use:
<Login
onLogin={this.onLogin}
onResetPassword={this.onResetPassword}
/>
since you are defining those inside the component definition
clucasalcantara commented
I've tried, but the same error appears :/, I'll probably missing something on the component definition.
chagasaway commented
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