1class App extends Component {
2 constructor() {
3 super()
4 this.state = { isRed: true }
5 }
6
7 render() {
8 const isRed = this.state.isRed
9
10 return <p style={{ color: isRed ? 'red' : 'blue' }}>Example Text</p>
11 }
12}
1style={{ textDecoration: todo.completed && "line-through" }}
2
3style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
1<ImageBackground source={Images.bg} style={ (navHeight==0) ? styles.bg1 : styles.bg2}>