-
-
Save wclittle/e15e984450e8b5c37e23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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