Here is the code I am working with:
const [focused, setFocused] = useState(false);
<TextInput
style={{
...styles.inputStyles,
borderColor: `${focused ? colors.darkPurple : "#b8b8b850"}`,
borderWidth: `${focused ? 3 : 1}`,
}}
placeholder="Enter Username"
placeholderTextColor={colors.lightGray}
onFocus={() => setFocused(true)}
onBlur={() => setFocused(false)}
/>
When the screen loads, the app crashes. How can I dynamically change the borderWidth?