Button.js
import { connect, actions } from 'mirrorx'
const Button = ({value, handleClick}) => (
<button onClick={handleClick}>
{value}
</button>
)
Button.propTypes = {
value: Proptypes.String.isRequired
}
const mapToProps = (state, { id }) => ({,
handleClick: () => actions.cart.doStuff(id)
})
const ConnectedButton = connect(mapToProps)(Button)
export {
Button,
ConnectedButton
}
// <ConnectedButton id={123} />