1
Well, I started programming yesterday in React Native and still do not understand very well how to do things.... I need to pass a series of sentences to several variables, each variable a sentence, and then present them randomly.
onPlay(){
// const um = "testeeeeee";
}
// EVENTS
// SPECIFIC METHODS
render() {
return (
<View style={styles.container}>
<View style={{flex:1, backgroundColor: 'skyblue'}}>
<Text style={styles.title}>
Would You Rather
</Text>
<TouchableHighlight style={[styles.primary_button,styles.medium_button]} onPress={this.onPlay.bind(this)}>
<Text style={styles.medium_button_text}>
test
</Text>
</TouchableHighlight>
</View>
<View style={{flex:1, backgroundColor: 'steelblue'}}>
<TouchableHighlight style={[styles.primary_button,styles.medium_button]} onPress={this.onPlay.bind(this)}>
<Text style={styles.medium_button_text}>
test2
</Text>
</TouchableHighlight>
</View>
</View>
);
}
You don’t have
state
norprops
? where these phrases come from?– Sergio
the phrases I was thinking of passing them by hand to the variables directly in the code
– Alexandre Seabra