npm install --save @beanloop-ab/react-counter
import * as React from 'react'
import {Counter} from 'react-counter'
class Example extends React.Component {
render() {
return (
<div>
<Counter from={500} to={1600} duration={2000} />
<Counter to={1000} duration={2000} easing={n => n * n} />
<Counter to={1000} duration={2000} easing={n => n} />
<Counter to={1000}>
{value => (
<p style={{color: 'red'}}>
{value} custom formatting with render prop
</p>
)}
</Counter>
</div>
)
}
}
MIT © Beanloop, Jakob Miland