Created
February 6, 2018 19:22
-
-
Save pokorson/2a5f40a16aa78034730704ba8853ab7e to your computer and use it in GitHub Desktop.
Recompose examples
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
const Buttons = branch( | |
props => props.loading, | |
withProps({ label: 'LOADING...', isDisabled: true }), | |
withProps({ id: 'signIn', label: 'SIGN IN', type: 'submit' }) | |
)(SignInButton); | |
const Buttons = ({ loading }) => | |
loading ? ( | |
<SignInButton label="LOADING..." isDisabled={true} /> | |
) : ( | |
<SignInButton id="signIn" label="SIGN IN" type="submit" /> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment