-
-
Save firstChairCoder/17313e5725d79534b32f751b85fb868a 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
//@ts-nocheck | |
import Constants, {AppOwnership} from 'expo-constants'; | |
import {Image} from 'react-native'; | |
let ImageElement = Image; | |
function init() { | |
// https://docs.expo.dev/versions/latest/sdk/constants/ | |
// AppOwnership.Expo - The experience is running inside of the Expo Go app. | |
if (Constants.appOwnership !== AppOwnership.Expo) { | |
import('react-native-fast-image').then((FastImage) => { | |
ImageElement = FastImage; | |
}); | |
} | |
} | |
init(); | |
export default ImageElement; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment