React Native - 调试错误

时间:2017-09-26 17:35:38

标签: reactjs react-native react-native-android

我刚刚开始学习React-(Native),我觉得调试错误感觉不舒服。大多数情况下,它们都没有指向我的代码中的任何一行,这使得很难找到解决方案。

例如: Error Case

在这种情况下,我怎么能从我的行中找到这个异常被调用?

另外,如果你知道如何解决这个问题,那就是代码:

index.js

import {
    StackNavigator,
  } from 'react-navigation';

import LoginScreen from './loginView'
import HomeScreen from './homeView'

export default screens = StackNavigator({
    Home: { screen: HomeScreen },
    Login: { screen: LoginScreen },
  });

loginView

import {StackNavigator,} from 'react-navigation';

import LoginScreen from './loginView'
import HomeScreen from './homeView'

export default screens = StackNavigator({Home: { screen: HomeScreen },Login: { screen: LoginScreen },});

homeView

(粘贴不工作) https://pastebin.com/YsnVkinQ

index.android.js

import React, { Component } from 'react';
import screens from './app/index';

import {AppRegistry,StyleSheet,Text,View} from 'react-native';

AppRegistry.registerComponent('estudo1', () => screens);

0 个答案:

没有答案