Sometimes, we want to fix the issue where user cannot write first letter with noncapital with React Native
In this article, we’ll look at how to fix the issue where user cannot write first letter with noncapital with React Native.
How to fix the issue where user cannot write first letter with noncapital with React Native?
To fix the issue where user cannot write first letter with noncapital with React Native, we can set the autoCapitalize
prop of the TextInput
to 'none'
.
For instance, we write:
import * as React from 'react';
import { View, Text, TextInput } from 'react-native';
import { Card } from 'react-native-paper';
const App = () => {
return (
<View>
<TextInput placeholder="name" autoCapitalize="none" />
</View>
);
};
export default App;
to set the autoCapitalize
prop to 'none'
to disable auto-capitalizing the first word of the input value.
Conclusion
To fix the issue where user cannot write first letter with noncapital with React Native, we can set the autoCapitalize
prop of the TextInput
to 'none'
.