Does AppLoading support child tags? (Loading... 59%)

I want to put some text (e.g., “Loading… 59%”) within (i.e.,: ON TOP) of the AppLoading tag. I’m not seeing any text and am wondering if inner tags are ignored?

                <AppLoading
                    startAsync={this._cacheResourcesAsync}
                    onFinish={this._onFinish}
                    onError={console.warn}
                >
                    <View style={styles.backdropView}>
                        <Text style={styles.headline}>Headline</Text>
                    </View>
                </AppLoading>
...
    backdropView: {
        height: 120,
        width: 320,
        backgroundColor: 'rgba(255,0,0,1)',
    },
    headline: {
        fontSize: 30,
        textAlign: 'center',
        backgroundColor: 'rgba(255,0,0,1)',
        color: 'red'
    }

<AppLoading/> doesn’t support child elements. It’s not a typical React component, and rather is a sentinel for the app to decide whether to remove the loading screen. You can see what it eventually boils down to here: https://github.com/expo/expo-sdk/blob/a4911c44b6b88a059f0a7e8bf09eeefee286a7b6/src/launch/AppLoading.js

1 Like