lundi 4 juillet 2016

Unable to execute hello world on React native+ ios


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

const App = () => {
return (
<Text>Hello World!</Text>
);
}

// App registration and rendering
AppRegistry.registerComponent('MyApp', () => App);

Above is the code I m trying to run but it fails giving following error on iOS simulator :

Application has not been registered .This is due to require() error during initialisation or failure to call AppRegistery.registerComponent.

Please shed some light as to what is just happening.its my first encounter with REACT and this is not making me happy...

I guess it is the node version or the react version which is causing problems:

Nodejs version : 4.4.5

React native version : 0.28

Can someone just give me a proper guidance to start with react native.Official docs are just not helping :(


Aucun commentaire:

Enregistrer un commentaire