how to truncate text in react native code example
Example 1: react-native text overflow ellipsis
<Text numberOfLines={1} ellipsizeMode='tail'}>
Example 2: react native text ellipsis
<Text numberOfLines={1} ellipsizeMode='end'}>
Example 3: react native ellipsis
<View style = { styles.MainContainer }>
<Text style={styles.TextStyle} numberOfLines = { 1 } >
This is the Sample Ellipsis Text for Ellipsis from End.
</Text>
<Text style={styles.TextStyle} numberOfLines = { 1 } ellipsizeMode = 'head'>
This is the Sample Ellipsis Text for Ellipsis from Start.
</Text>
<Text style={styles.TextStyle} numberOfLines = { 1 } ellipsizeMode = 'middle'>
This is the Sample Ellipsis Text for Ellipsis from Middle.
</Text>
</View>