import React, {Component} from 'react';
import { connect } from 'redux';
import { certainAction } from '../actions';
class Example extends Component {
render() {
return (
<div>Example</div>
)
}
}
// [1] --- Without shortcut
const mapDispatchToProps = {
certainAction: certainAction,
}
export default connect(null, mapDispatchToProps)(Example)
// [2] --- with shorcut
export default connect(null, {certainAction})(Example)
Last active
September 29, 2017 10:47
-
-
Save Kcin1993/508fe9a0c9ebb68d61dcf595a4c8d754 to your computer and use it in GitHub Desktop.
Redux Connect
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment