Created
May 7, 2019 06:54
-
-
Save jakwuh/9485fef622d0fd024892c55d3de3b375 to your computer and use it in GitHub Desktop.
withGhost stupid example
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 { withBranch, renderComponent } from 'recompose'; | |
withBranch( | |
props => props.data.loading, | |
renderComponent(CustomGhostComponent), | |
); | |
--- | |
import { withProps, compose } from 'recompose'; | |
import { withGhost } from '@aap/boostrap'; | |
compose( | |
withProps(props => ({ | |
isFetching: props.data.loading | |
})), | |
withGhost({ | |
Ghost: CustomGhostComponent, | |
}) | |
); | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment