2016-05-20 7 views

答えて

3

私たちは現在それを達成することはできません。そうしようとすると、次のエラーが表示されます。単一のエントリポイントをシミュレートする1​​つの方法は、単一のエントリが

Application.js

import React from 'react'; 
import { 
    Component, 
    View, 
    Text, 
} from 'react-native'; 

class Application extends Component { 

    render() { 
     return (
      <View><Text>Hello world</Text></View> 
     ); 
    } 
} 

module.exports = Application; 

と同じをコピー&ペースト以下のようなアプリケーションを指したコンテナコンポーネントを作成することである

enter image description here

index.ios.jsとindex.android.jsの内容

import { 
    AppRegistry, 
} from 'react-native'; 

import Application from './Application'; 
AppRegistry.registerComponent('YourAppName',() => Application); 
関連する問題