第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

警告:React.createElement:類型無(wú)效

警告:React.createElement:類型無(wú)效

桃花長(zhǎng)相依 2022-09-02 21:18:22
我正在嘗試構(gòu)建一個(gè)反應(yīng)本機(jī)博覽會(huì)應(yīng)用程序并收到此錯(cuò)誤api.jsexport const fetchMeetups = () =>    fetch('http://localhost:3000/api/meetups')        .then(res => res.json());應(yīng)用程序.jsimport * as React from 'react';import { Platform, StyleSheet, Text, View, ActivityIndicator } from 'react-native';import { fetchMeetups } from './constants/api'; const instructions = Platform.select({  ios: `Press Cmd+R to reload,\nCmd+D or shake for dev menu`,  android: `Double tap R on your keyboard to reload,\nShake or press menu button for dev menu`,});class App extends React.Component{  static defaultProps = {    fetchMeetups  }  state = {    loading: false,    meetups: []  }  async componentDidMount(){    this.setState({loading: true});    const data = await this.props.fetchMeetups();    setTimeout(() => this.setState({loading: false, meetups: data.meetups}),2000)  }  render(){    if(this.state.loading){      return(        <ActivityIndicator size="large"/>      )    }    return (      <View style={styles.container}>        <Text>MeetupME</Text>      </View>    );  }}const styles = StyleSheet.create({  container: {    flex: 1,    justifyContent: 'center',    alignItems: 'center',    backgroundColor: '#F5FCFF',  },  welcome: {    fontSize: 20,    textAlign: 'center',    margin: 10,  },  instructions: {    textAlign: 'center',    color: '#333333',    marginBottom: 5,  },});索引.jsimport { registerRootComponent } from 'expo';import App from './App';// registerRootComponent calls AppRegistry.registerComponent('main', () => App);// It also ensures that whether you load the app in the Expo client or in a native build,// the environment is set up appropriatelyregisterRootComponent(App);
查看完整描述

1 回答

?
心有法竹

TA貢獻(xiàn)1866條經(jīng)驗(yàn) 獲得超5個(gè)贊

看起來(lái)像 App.js 缺少默認(rèn)導(dǎo)出。

index.js 嘗試導(dǎo)入默認(rèn)導(dǎo)出 (),因此您只需將以下內(nèi)容添加到 App.js。例如,到文件末尾。import App from './App'

export default App


查看完整回答
反對(duì) 回復(fù) 2022-09-02
  • 1 回答
  • 0 關(guān)注
  • 152 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)