Describe the bug
When adding the text-center, text-left, text-right class to a React Native TextInput, the app crashes with Render Error the following is the error:
path.split is not a function (it is undefined)
The error originates in react-native-css at src/native/styles/index.ts in line 250
It appears path is undefined (or non-string) during runtime parsing of the class path. This crash happens when text-center, text-left, text-right is applied to a TextInput. Other components appear unaffected
Reproduction
I reproduced using the recommended template and then upgrading to NativeWind v5:
npx rn-new@latest --nativewind --expo-router
Migrated to NativeWind v5
And added this minimal component:
`
import { TextInput } from 'react-native';
export default function Home() {
return (
<"TextInput"
placeholder="Type here..."
className="mb-4 rounded-md border border-gray-300 p-2 text-center"
/>
);
}
`
Expected behavior
Applying text-center or text-left or text-right to TextInput should center the input text without throwing an exception.