Skip to content

Instantly share code, notes, and snippets.

@wclittle
Created December 28, 2015 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wclittle/e15e984450e8b5c37e23 to your computer and use it in GitHub Desktop.
Save wclittle/e15e984450e8b5c37e23 to your computer and use it in GitHub Desktop.
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Chat from '../components/Chat';
import * as ChatActions from '../actions/chat';
function mapStateToProps(state) {
return {
messages: state.chat
}
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(ChatActions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(Chat);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment