Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See (https://github.com/facebook/react-native/issues/12981) for more info. (Saw setTimeout with duration 111862ms)
export default class Login extends Component { constructor(props) { super(props) this.state = { email: '', password: '', response: '' } this.signUp = this.signUp.bind(this) this.login = this.login.bind(this) } async signUp() { try { await firebase.auth().createUserWithEmailAndPassword(this.state.email, this.state.password) this.setState({ response: 'Account Created!' }) setTimeout(() => { this.props.navigator.push({ id: 'App' }) }, 1500) } catch (error) { this.setState({ response: error.toString() }) } } async login() { try { await firebase.auth().createUserWithEmailAndPassword(this.state.email, this.state.password) this.setState({ response: 'user login in' }) setTimeout(() => { this.props.navigator.push({ id: 'App' }) }) } catch (error) { this.setState({ response: error.toString() }) } } render() { return ( this.setState({ email })} onChangeText={(email) => {console.log(email);}} /> this.setState({ password })} /> Login Signup ) } } I Reported to Google Firebase Team: (https://github.com/firebase/firebase-js-sdk/issues/97)