Setting a timer for a long period of time, i.e. multiple minutes

This page summarizes the projects mentioned and recommended in the original post on /r/codehunter

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • react-native

    A framework for building native applications using React

  • 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)

  • firebase-js-sdk

    Firebase Javascript SDK

  • 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)

  • 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.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts