boadude / ReactNativeExpo.js

An React Native Starter Kit with Expo + NativeBase + Best configuration for VSCode IDE.
MIT License
42 stars 7 forks source link

Show white page with `AppLoading`? #11

Closed thearabbit closed 4 years ago

thearabbit commented 4 years ago
  async loadFonts() {
    await Font.loadAsync({
      Roboto: require('native-base/Fonts/Roboto.ttf'),
      Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
      Questrial: require('@assets/fonts/Questrial.ttf'),
      ...Ionicons.font,
    });

    setTimeout(() => {
      this.setState({ isReady: true });
    }, 2000);
  }

  render() {
    if (!this.state.isReady) {
      // return <Text>Loading....</Text>;
      return <AppLoading></AppLoading>;
    }
.............

Don't show anything on AppLoading (White Page)???

boadude commented 4 years ago

Remember, this is only a Boilerplate for start doing your project. That code is the for using if you want a Loading Screen.