delay-component-load
v1.0.3
Published
'Simple lazy loading react component which will load as per time interval defined with counter'
Downloads
4
Maintainers
Readme
Delay component load
Just delays component rendering time with counter
Installation
$ npm i delay-component-load
OR
$ yarn add delay-component-load
Usage
const SET_TIME_INTERVAL = 10;
.
.
.
<Lazy
timeInterval={this.state.timeInterval}
label={`You can resend in %timer% seconds`}
>
<span
className='textbutton textbutton--small'
onClick={(e) => {
// this.handleInvite(e, false, false)
this.setState({
timeInterval: SET_TIME_INTERVAL
})
}}
>
Resend
</span>
</Lazy>