1You can achieve this by passing in the onFocus and onBlur events to set and unset styles when focused and blurred:
2
3 onFocus() {
4 this.setState({
5 backgroundColor: 'green'
6 })
7 },
8
9 onBlur() {
10 this.setState({
11 backgroundColor: '#ededed'
12 })
13 },
14And then, in the TextInput do this:
15
16<TextInput
17 onBlur={ () => this.onBlur() }
18 onFocus={ () => this.onFocus() }
19 style={{ height:60, backgroundColor: this.state.backgroundColor, color: this.state.color }} />