Created
February 19, 2017 18:55
-
-
Save graphan/ca1c6d21bc75153366bc0e39e189c683 to your computer and use it in GitHub Desktop.
Use of Recompose's branch for Loading Component
This file contains hidden or 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
import { branch, renderComponent } from 'recompose'; | |
const Loading = () => ( | |
<div>Loading....</div> | |
); | |
export const withLoadingComponent = branch( | |
props => props.loading, | |
renderComponent(Loading), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment