redux connect

JavaScript
 import { connect } from 'react-redux'//Connects your component to Redux-store
export default connect(mapState, mapDispatch)(Component)const mapStateToProps = state => ({ todos: state.todos })
Copied
Source

Also in JavaScript: