我正在尝试制作一个与React Native
一起使用的简单聊天应用程序进行学习。这是App.js
:
//import the screens
import Chat from './components/Chat';
//import react navigation
import { createStackNavigator, createAppContainer } from 'react-navigation';
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
//create the navigator
const navigator = createStackNavigator({
Chat: { screen: Chat },
});
//export it as the root component
export default createAppContainer(navigator);
我经常遇到null is not the object
的错误:
在终端上没有太多有关该错误的信息:
Loading dependency graph, done.
DELTA [android, dev] ..\..\../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (740/740), done.
::ffff:127.0.0.1 - - [01/Mar/2019:05:35:34 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 200 - "-" "okhttp/3.12.1"
::ffff:127.0.0.1 - - [01/Mar/2019:05:35:37 +0000] "POST /symbolicate HTTP/1.1" 200 - "-" "okhttp/3.12.1"
::ffff:127.0.0.1 - - [01/Mar/2019:05:35:39 +0000] "POST /symbolicate HTTP/1.1" 200 - "-" "okhttp/3.12.1"
似乎null
已传递到路由交换机。是什么导致错误?
答案 0 :(得分:1)
只能有一个export
,但可以有多个import { export1, export2 } from "./componentName"
您可以像这样导入多个导出
for layer in model.layers:
weights = layer.get_weights()