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);

Readme

Keywords

none

Package Sidebar

Install

npm i react-stateless-lifecycle

Weekly Downloads

2

Version

0.0.3

License

ISC

Last publish

Collaborators

  • maliciousintent