Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/25.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
Reactjs React Native-返回响应错误代码:500-无法解析模块。这可能与error react native/issues/4968有关_Reactjs_React Native - Fatal编程技术网

Reactjs React Native-返回响应错误代码:500-无法解析模块。这可能与error react native/issues/4968有关

Reactjs React Native-返回响应错误代码:500-无法解析模块。这可能与error react native/issues/4968有关,reactjs,react-native,Reactjs,React Native,import React,{Component}来自'React'; 从“react native”导入{样式表、文本、视图}; 导出默认类ChatHomeScreen扩展组件{ render(){ var{navigate}=this.props.navigation; 返回(欢迎来到聊天屏幕);} const styles=StyleSheet.create({容器:{flex:1,背景色:'#fff',justifyContent:'center',} }); 不知道我错在哪里。只要我删

import React,{Component}来自'React';
从“react native”导入{样式表、文本、视图};
导出默认类ChatHomeScreen扩展组件{
render(){
var{navigate}=this.props.navigation;
返回(欢迎来到聊天屏幕);}
const styles=StyleSheet.create({容器:{flex:1,背景色:'#fff',justifyContent:'center',}
});
不知道我错在哪里。只要我删除这个聊天室主屏幕相关代码(导入、返回),应用程序就可以正常工作了吗


提前感谢

导入过程中缺少斜杠:


.src应为./src

导入中缺少斜杠:


.src应为./src

发布与此相关的代码ChatHomescreen@GabrielMesquita-从“React”导入React,{Component};从“react native”导入{样式表、文本、视图};导出默认类ChatHomeScreen扩展组件{render(){var{navigate}=this.props.navigation;return(欢迎来到聊天屏幕);}}const styles=StyleSheet.create({容器:{flex:1,backgroundColor:'#fff',justifyContent:'center',})@加布里埃尔·梅斯基塔-你能帮我整理一下吗。。代码在屏幕截图中。发布与ChatHomescreen@GabrielMesquita-从“React”导入React,{Component};从“react native”导入{样式表、文本、视图};导出默认类ChatHomeScreen扩展组件{render(){var{navigate}=this.props.navigation;return(欢迎来到聊天屏幕);}}const styles=StyleSheet.create({容器:{flex:1,backgroundColor:'#fff',justifyContent:'center',})@加布里埃尔·梅斯基塔-你能帮我整理一下吗。。代码在截图中。太好了。请接受这个答案,这样它就不会无法解决。谢谢你。请接受这个答案,这样它就不会无法解决。谢谢
import React, { Component } from 'react'; 
import { StyleSheet, Text, View } from 'react-native'; 

export default class ChatHomeScreen extends Component { 
    render() { 
     var {navigate} = this.props.navigation; 
     return ( <View style={styles.container}> <Text>Welcome to Chat Screen</Text> </View> ); } } 
     const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', justifyContent: 'center', } 
    });