Skip to content

Instantly share code, notes, and snippets.

@gyver98
Last active March 17, 2017 12:25
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 gyver98/bd677915a8b4ea68589497311c77eaee to your computer and use it in GitHub Desktop.
Save gyver98/bd677915a8b4ea68589497311c77eaee to your computer and use it in GitHub Desktop.
import TeslaClimate from '../components/TeslaClimate/TeslaClimate';
import { connect } from 'react-redux';
import { changeClimate } from '../actions'
const mapStateToProps = (state) => {
return {
value: state.config.climate,
limit: state.config.temperature > 10
}
}
const mapDispatchToProps = (dispatch) => {
return {
handleChangeClimate:() => {
dispatch(changeClimate())
}
}
}
const TeslaClimateContainer = connect(mapStateToProps, mapDispatchToProps)(TeslaClimate)
export default TeslaClimateContainer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment