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

Dependencies (0)

    Dev Dependencies (21)

    Package Sidebar

    Install

    npm i react-stateless-lifecycle

    Weekly Downloads

    1

    Version

    0.0.3

    License

    ISC

    Last publish

    Collaborators

    • maliciousintent