Skip to content

Roadmap beta release

Rajender Joshi edited this page Sep 10, 2019 · 1 revision

Props

name type default description
start int 0 Start interval from a number
end func () => true Stops the timer when end condition is met. Provides current value as callback to function
interval int 1000 Timer interval in ms
onStart func () => {} Callback function which executes when timer starts
onEnd func () => {} Callback function which executes when timer ends
onTick func (value) => value - 1 Callback function which executes on every interval

Render props api

<Timer>
{ (value) => <span>`${}`</span> }
</Timer>
Clone this wiki locally