-1
Ich starte ein reaktions-natives Projekt. Aber selbst nachdem ich dem besten Community-Code gefolgt bin, bekomme ich Fehler bei der Geräte-Emulation. Kannst du bitte helfen ?Appregistry Fehler reactive-native
import React, { Component } from 'react';
import { Appregistry, Text,View ,StyleSheet} from 'react-native';
import Compo from './app/app/Compo';
export default class test extends Component {
render(){
return(
<View>
<Compo />
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent ('test',() => test);
und meine namens App ist
import React, { Component } from 'react';
import { Appregistry,Text,View,StyleSheet } from 'react-native';
export default class Compo extends Component {
render(){
return(
<View>
<Text>Hi Bineesh</Text>
</View>
)
} }
AppRegistry.registerComponent ('Compo',() => Compo);
Warum dies Fehler AppRegistry wirft?
Was ist der Fehler? –
@SagarKhatri kann Variable AppRegistry nicht finden – Bineesh
Es ist ein Tippfehler in Ihrer Import-Anweisung. 'Appregistry = AppRegistry' –