I have a string of the type:
<Text> {mi_cadena} </Text>
and I would like the value to appear in uppercase automatically. Is there any way to do it?
I have a string of the type:
<Text> {mi_cadena} </Text>
and I would like the value to appear in uppercase automatically. Is there any way to do it?
Yes! Use
.toUpperCase()
of JavaScript:You can also use styling on Text elements for this purpose as follows:
Available options are 'none', 'uppercase', 'lowercase', 'capitalize'. Documentation
This way I fixed the problem. "In TextInput autoCapitalize="characters" is added, that way it worked for me, I recommend testing on a physical device since emulators usually have errors"