Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.