Make lifecycle more functional than what it currently is
alaboudi opened this issue · comments
I want to suggest a new way to invoke the lifecycle HOC.
Instead of using the lifecycle hook this way
lifecycle({
componentDidMount() {
this.setState({someKey: this.props.someValue});
}
});
the below code is more functionally aligned with the rest of the library
lifecycle({
componentDidMount: (state, props) => {
props.someStateHandler(props.someValue);
}
})
After observing the internals of how lifecycle works, its very easy to do this change and I can volunteer to do it. It's just a question of whether you guys think this is a good idea or not. Cheers
I'm going to close this issue because it's better to consolidate discussion under one issue.