npm

Need private packages and team management tools?Check out npm Orgs. »

react-timer

1.1.1 • Public • Published

react-timer

npm version

react-timer is a simple timer component using react.

Click here for a demo

Install

yarn add react-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

import Timer from 'react-timer'
import ReactDOM from 'react-dom'
import React, { Component, PropTypes } from 'react'
 
class TestComponent extends Component {
  /* delay is just the delay on showing the update of the timer */
  const OPTIONS = { prefix: 'seconds elapsed!', delay: 100}
  render () {
    return (
      <div>
        <Timer options={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

install

npm i react-timer

Downloadsweekly downloads

165

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability