我正在尝试使用RN通过emancode在youtube中复制TaxiApp教程。我是Javascript和RN的初学者,但是我有超过8年的PHP-OOP经验。
index.js
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);
index.js
import React, { Component, PropTypes } from "react";
import { Router } from "react-native-router-flux";
import scenes from "../routes/scenes";
import { Provider } from "react-redux";
export default class AppContainer extends Component {
static propTypes = {
store: PropTypes.object.isRequired
}
render() {
return (
<Provider store={this.props.store}>
<Router scenes={scenes} />
</Provider>
)
}
}
错误1。Cannot read property 'object' of undefined
错误2。Module AppRegistry is not a registered callable module
RN版本 react-native-cli:2.0.1 反应本机:0.59.8