Last active
March 17, 2017 12:25
-
-
Save gyver98/bd677915a8b4ea68589497311c77eaee 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 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