You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classTimerextendsComponent{staticpropTypes={children: Types.func.isRequired,
...timerProps};staticdefaultProps={onTime: noop};state={timed: false};componentDidMount(){this.timeout=setTimeout(()=>{this.props.onTime();this.setState({timed: true});},this.props.time);}componentWillUnmount(){clearTimeout(this.timeout);}render(){if(process.env.NODE_ENV!=='production'){if(typeofthis.props.children!=='function'){thrownewTypeError('Children in <Timer/> must be a function.');}}returnthis.props.children(this.state.timed);}}
Create
<Timer>
or<Reminder>
componentsThe text was updated successfully, but these errors were encountered: