Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Styling not working in all text view in react native

Tags:

react-native

Below is the code snippet of my screen, styling is working perfectly on 2 text views but not on the last one. Can anyone help me?

<View style={styles.userInfo}>
        <View style={styles.section}>
          <Text style={[header3,styles.space,baseColor]}>{this.state.data.postCount}</Text>
          <Text style={[secondary1, hintColor]}>Posts</Text>
        </View>
        <View style={styles.section}>
          <Text style={[header3,styles.space,baseColor]}>{formatNumber(this.state.data.followersCount)}</Text>
          <Text style={[secondary1, hintColor]}>Followers</Text>
        </View>
        <View style={styles.section}>
          <Text styles={[header3,styles.space,baseColor]}>{this.state.data.followingCount}</Text>
          <Text style={[secondary1, hintColor]}>Following</Text>
        </View>
      </View>
      <Gallery items={this.state.data.images} />
    </ScrollView>
like image 467
Saad Maqbool Avatar asked Dec 06 '25 22:12

Saad Maqbool


1 Answers

You have extra s in the last text style

try this

<View style={styles.userInfo}>
        <View style={styles.section}>
          <Text style={[header3,styles.space,baseColor]}>{this.state.data.postCount}</Text>
          <Text style={[secondary1, hintColor]}>Posts</Text>
        </View>
        <View style={styles.section}>
          <Text style={[header3,styles.space,baseColor]}>{formatNumber(this.state.data.followersCount)}</Text>
          <Text style={[secondary1, hintColor]}>Followers</Text>
        </View>
        <View style={styles.section}>
          <Text style={[header3,styles.space,baseColor]}>{this.state.data.followingCount}</Text>
          <Text style={[secondary1, hintColor]}>Following</Text>
        </View>
      </View>
      <Gallery items={this.state.data.images} />
    </ScrollView>
like image 87
Ahsan Sohail Avatar answered Dec 08 '25 16:12

Ahsan Sohail