React natif n'affichera pas ou de mes Etats. Mais ils travaillent avec des fonctions.React native ne montre pas {} this.state.age dans le texte
C'est dans mon code:
import {
StyleSheet,
View,
Image,
Text, //Important
PanResponder,
Animated,
Dimensions,
Button,
Slider,
TouchableWithoutFeedback,
Alert,
TouchableOpacity,
TouchableHighlight,
Modal, // Important
} from 'react-native'
Mon Constructor:
constructor(props) {
super(props);
this.state = {ModalMenu: false};
this.state = {ModalKunst: false};
this.state = {ModalArtwork: false};
this.state = { viewRef: null };
this.state = { age: 150 };
this.state = { farbe: 'black'};
this.state = {ModalPrice: false};
this.state = {
TextInputName: '',
TextInputEmail: '',
}
this.state = {
TextInputName2: '',
TextInputEmail2: ''
}
}
Pour afficher l'état:
render() {
const {birthday, name, bio, id, id2} = this.props.profile
const profileAge = this.calcAge(birthday)
var fbImage = require('./img/bild12.jpg')
const rotateCard = this.pan.x.interpolate({
inputRange: [-200, 0, 200],
outputRange: ['10deg', '0deg', '-10deg'],
})
const animatedStyle = {
transform: [
{translateX: this.pan.x},
{translateY: this.pan.y},
{rotate: rotateCard},
]
}
return (
<View><Text>{this.state.age}</Text></View>
);
}}
Mais sa ne montrant rien :( Je ne aussi » t obtenir une erreur Serait très bien si quelqu'un pouvait m'aider avec ça. Je mis à jour tout le code rendu
peut vous montrer votre code complet – grgmo
montrer votre code essayé – Balasubramanian
yapz .. peut-être vous devez montrer le code complet. Nous connaissons donc votre problème .. – muhammadaa