Sorulan benzer soruları gördüm ama sorunu özdeşleştiremiyorum. Tepki yerel kullanıyorum 0.27 Tüm gereksinim yöntemlerini içe aktarma işlemlerini değiştirdim. onun ilgiliyseReact-native: Süper ifadesi null veya bir işlev olmalıdır, undefined değil
Bilmiyorum, ancak aşağıdaki kodu içeren benim LoginComp.js dosyasına hata noktalarının birinci pozisyon: Burada
aldığım hata var/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
Image,
TextInput,
Button,
TouchableHighlight
} from 'react-native';
class LoginComp extends Component {
constructor(){
super(props);
}
render() {
return (
<View style={{flex: 1}}>
<View style={this.props.styles.loginLogoContainer}>
<Image style={this.props.styles.view1logo} source={require('../imgs/Logo.png')} />
</View>
<View style={this.props.styles.loginContainer}>
<Text>Użytkownik:</Text>
<TextInput
style={this.props.styles.defaultInput}
placeholder="Użytkownik"
stretch={true}
autoComplete={false}
autoCorrect={false}
/>
<Text>Hasło:</Text>
<TextInput
style={this.props.styles.defaultInput}
placeholder="Hasło"
stretch={true}
autoComplete={false}
autoCorrect={false}
secureTextEntry={true}
/>
<TouchableHighlight onPress={this.props.LoginPress}>
<Text style={this.props.styles.loginButton}>Login</Text>
</TouchableHighlight>
</View>
<View style={this.props.styles.registrationWrapper}>
<Text>- lub -</Text>
<TouchableHighlight onPress={this.props.t_Registration}>
<Text style={this.props.styles.registration}>Załóż nowe konto</Text>
</TouchableHighlight>
</View>
</View>
);
}
}
module.exports = LoginComp;
Teşekkürler - sorunumu çözdü. Ama neden böyle olmak zorunda? –
Yerel olarak tepki veren en son sürümde, 'React' ve 'Component', 'react-native' konumundan 'react' modülüne taşınır. Yani yukarıdaki yolu kullanarak onu almak zorunda kalacaksınız. – Jickson
ve bağlam hakkında yapıcı ne iletir? –