Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 流承诺此类型与未定义不兼容_React Native_Flowtype_Exponent_Expo - Fatal编程技术网

React native 流承诺此类型与未定义不兼容

React native 流承诺此类型与未定义不兼容,react-native,flowtype,exponent,expo,React Native,Flowtype,Exponent,Expo,得到警告 在线: 使用Flow.jsv.0.48.0。 代码示例: ... import { Font, AppLoading } from 'expo'; ... export default class App extends Component { async componentDidMount() { await Font.loadAsync(fontsStore); ... } ... } 找到黑客解决方案: 。。。 componentDidMount

得到警告

在线:

使用Flow.jsv.0.48.0。 代码示例:

...
import { Font, AppLoading } from 'expo';
...
export default class App extends Component {
  async componentDidMount() {
    await Font.loadAsync(fontsStore);
    ...
  }
  ...
}
找到黑客解决方案:

。。。
componentDidMount(){
这是loadFonts();
}
异步加载字体(){
等待Font.loadAsync(fontsStore);
this.setState({fontLoaded:true});
}
…