I would like to style text as superscript in React Native. How would this be accomplished? Is there a way to make use of the Javascript sup()
string method to r
Javascripts sub()
function will only surround your text with tags and they are recognized as text in RN. You would need to build your own function like:
export default class Test extends Component {
sub = (base, exponent) => {
return
{base}
{exponent}
}
render() {
return(
{(() => 'hello'+'world'.sub())()}
{(() => this.sub('hello','world'))()}
{(() => this.sub('2','6'))()}
);
}
}