I am using style={{textDecorationLine: 'underline'}}, but app currently shows like this.
But I want it to look like this
React-Native : Space between underline text
367 views Asked by Trần Đình Thắng At
2
There are 2 answers
0
On
Here is a tested example on snack based on @Nooruddin Lakhani with some modifications.
the result:
the code:
export default function App() {
const textArray = ['this', 'is', 'a', 'test'];
const renderTexts = () => {
return textArray.map((item) => {
return (
<Text style={{ textDecorationLine: 'underline', marginLeft:2 }}>{item}</Text>
);
});
};
return (
<View>
<Text>{renderTexts()}</Text>
</View>
);
}

Try this way