Skip to content

Instantly share code, notes, and snippets.

@Abazhenov
Created December 28, 2017 18:03
Show Gist options
  • Save Abazhenov/927eef8c5ad903de621d9af0bc4243be to your computer and use it in GitHub Desktop.
Save Abazhenov/927eef8c5ad903de621d9af0bc4243be to your computer and use it in GitHub Desktop.
import React from 'react'
import { mapDispatchToProps, mapStateToProps } from '../myFancyDecorators'
@mapStateToProps((state) => ({
users: state.users
}))
@mapDispatchToProps((dispatch, ownProps) => ({
getUser(id) {
dispatch(ownProps.getUser(id))
}
}))
export default class MyFancyComponent extends React.Component {
// react things in here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment