如何修复“开发服务器返回的响应错误代码:500”,此错误在本机反应中

时间:2019-06-15 06:07:00

标签: reactjs react-native native-base

export default class HomeScreen extends React.Component {
  static navigationOptions = {
    header: null,
};    
  render() {
    return (
      
      <View  style={{flex: 0,width: 360, height: 700, backgroundColor: 'skyblue', alignContent: 'center'}}>
      <View  style={{flex: 0.2, alignItems: 'center'}}>   
        <View style={{ flexDirection: 'column',flex: 0.5,alignItems: 'center', justifyContent: 'center' }}>             
         <View style={{ flex: 0, flexDirection: 'row', justifyContent: 'space-evenly' }}>

</View>
 </View>   
         
        <View style={{ flex: 0, flexDirection: 'row', justifyContent: 'space-evenly' }}>
        <Button 
          title="signup"
          onPress={() => {
            this.props.navigation.dispatch(StackActions.reset({
              index: 0,
              actions: [
                NavigationActions.navigate({ routeName: 'Details' })
              ],
            }))
          }}
        />
       
</View>       
      </View>      
      
    ); 
  }  
}

export default class firstpage extends React.Component{
  render(){
    return(
    
      <View style={{flex:1, alignItems:'center', justifyContent:'center'}}>
              <ImageBackground source={require('./abstract-old-grunge-stone-textures_1203-11355.jpg')}
              style={{width: 400, height: 400}}             
           />
        <Text>HOME PAGE</Text>
      </View>
    )
  }
  
};

const AppNavigator = createStackNavigator({
  
  Home: {
    screen: 'HomeScreen',
  },
  detail: {
    screen: 'firstpage',
  },
  Sumbitpage: {
    screen: 'HomeScreen',
  },
  
}, {
  initialRouteName: 'Home',
});
export default createAppContainer(AppNavigator);

enter image description here建议针对此开发错误的解决方案,此类型错误导致我的项目太多。我不明白为什么该错误会同时出现。我将执行许多步骤,以解决此错误的方法。你们中的任何人都可以帮助我解决此错误。

0 个答案:

没有答案