Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move mapStateToProps and mapDispatchToProps to be static class functions of the component #69

Open
flynnplatt opened this issue Jun 7, 2018 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@flynnplatt
Copy link
Contributor

flynnplatt commented Jun 7, 2018

Making these functions part of the component would allow components that inherit from _core components to more easily override/extend their props

Example:

export class ComponentName extends Component {
    static mapStateToProps(state) {...}
    static mapDispatchToProps(dispatch) {...}
    ...
    render() {...}
}

export default connect(ComponentName.mapStateToProps, ComponentName.mapDispatchToProps)(ComponentName);
@flynnplatt flynnplatt added enhancement New feature or request question Further information is requested labels Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant