React-Native: Application has not been registered error

后端 未结 23 2204
無奈伤痛
無奈伤痛 2020-12-22 18:55

I am currently going through the React-Native tutorials. I began with the Getting Started tutorial, where I made a new react native project and successfully managed to run t

23条回答
  •  被撕碎了的回忆
    2020-12-22 19:08

    you need to register it in index.android.js / index.ios.js

    like this:

    'use strict';
    
    import {
        AppRegistry
    } from 'react-native';
    
    import app from "./app";
    
    AppRegistry.registerComponent('test', () => app);
    

提交回复
热议问题