Dispatch
import { connect } from 'react-redux';
function mapStateToProps(state) {
return {
count: state.count
};
}
function Counter(props) {
console.log(props) // {count: 1}
return
Counter
props.dispatch({ type: "INCREMENT" }) }>+
{props.count}
props.dispatch({ type: "DECREMENT" }) }>-
}
export default connect(mapStateToProps)(Counter)
https://daveceddia.com/redux-tutorial/
https://www.valentinog.com/blog/redux/#react-redux-tutorial-getting-to-know-redux-reducers
Props is filled also with
dispatch function!