Last active
February 8, 2017 09:28
-
-
Save andycarrell/725e29c315cd957efe448a2bff164b10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FormWithSomeCouponInput extends React.Component { | |
constructor(props) { ... } | |
handleCouponBlur() { | |
const { coupon, actions } = this.props; | |
actions.applyBlur('coupon'); | |
actions.submitCoupon({ coupon }); | |
} | |
handleClearCoupon() { | |
const { actions } = this.props; | |
actions.applyChange('coupon', ''); | |
actions.applyBlur('coupon'); | |
actions.submitCoupon({ coupon: '' }); | |
} | |
render() { ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment