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