react-stateless-lifecycle

0.0.3 • Public • Published

React Stateless Lifecycle

Add component did mount and component will receive props to stateless component.

Known issues:

  • correct bind this

Example

import addLifecycle from 'react-stateless-lifecycle';

const wrapLifecycle = addLifecycle({
  handleComponentDidMount: Function,
  handleComponentWillReceiveProps: Function,
});

// ...

export default wrapLifecycle(MyComponent);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1
  • 0.0.2
    0

Package Sidebar

Install

npm i react-stateless-lifecycle

Weekly Downloads

1

Version

0.0.3

License

ISC

Last publish

Collaborators

  • maliciousintent