Add component did mount and component will receive props to stateless component.
- correct bind this
import addLifecycle from 'react-stateless-lifecycle';
const wrapLifecycle = addLifecycle({
handleComponentDidMount: Function,
handleComponentWillReceiveProps: Function,
});
// ...
export default wrapLifecycle(MyComponent);