Created
February 5, 2022 06:08
-
-
Save aravi365/b526018fdc26e4ef4fda99ce60c4058a 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
import React from 'react'; | |
import {ActivityIndicator} from 'react-native'; | |
export const withLoaderList = | |
Comp => | |
({isLoading, ...props}) => { | |
if (isLoading) { | |
return <ActivityIndicator color={'green'} />; | |
} else { | |
return <Comp {...props} />; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment