conditional inline style PROPS react native code example
Example 1: conditional style prop react
style={{ textDecoration: todo.completed && "line-through" }}
style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
Example 2: conditional style react native
<TextInput
style={[styles.text, touched && invalid ? styles.textinvalid : styles.textvalid]}
</TextInput>