3.1.0 • Published 9 years ago

react-lifecycle-hoc v3.1.0

Weekly downloads
15
License
MIT
Repository
github
Last release
9 years ago

react-lifecycle-hoc

Higher-order components of react lifecycle.

Travis Codecov Status npm package npm downloads license

Dependency Status devDependency Status peerDependency Status

Installation

$ npm install react-lifecycle-hoc --save

Usage

  • As HOC
import { componentDidMount } from 'react-lifecycle-hoc';

componentDidMount(
  ({ props }) => console.log(props),
)(() => <div/>);
  • ES7 decorator
@componentDidMount(callback)
class Container extends React.Component {
  render() {
    return <div/>;
  }
}

API

componentDidMount(
  callback: (this: Object) => void,
): HigherOrderComponent

Test

$ npm run lint
$ npm run test:watch

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ npm test).

CHANGELOG

LICENSE

MIT: http://michaelhsu.mit-license.org

3.1.0

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago