Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

74 Commits

Repository files navigation

react-timer

npm version

react-timer is a simple timer component using react.

Click here for a demo

Install

yarnaddreact-timer--save

Versions

1.0.0 uses React ^0.13.0

1.0.1 uses React ^0.15.1

1.1.0 uses React ^16.0.0

Use

importTimerfrom'react-timer'importReactDOMfrom'react-dom'importReact,{Component,PropTypes}from'react'classTestComponentextendsComponent{/* delay is just the delay on showing the update of the timer */constOPTIONS={prefix: 'seconds elapsed!',delay: 100}render(){return(<div><Timeroptions={OPTIONS}/></div>)}}ReactDOM.render(<TestComponent/>,document.getElementById('root'))

Development

yarn
yarn dev

Test

yarn test

Build

yarn
yarn build

Publish

npm login
npm version patch
git add -A
git push origin master
npm publish

License

MIT

About

A simple react timer component

Resources

Stars

21 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages