reactjs - error: bundling failed: "SyntaxError C:/Program Files/reactt/albums/index.androi d.js: Unexpected token, expected ; (6:8)" -


i have code below:

import react 'react'; import { text, appregistry } 'react-native';  const app = () => (    <text>boy awsome</text> );   appregistry.registercomponent('albums', () => app); 

you trying run app on android platform u should export file app.js first, in export current file code export default app; put code @ end of ur file , import app file in index.android.js file code:

import { appregistry } 'react-native';  import app './src/app';    appregistry.registercomponent('appname', () => app);

in case app.js file in src folder hope helps


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -