1handleKeyPress = (event) => {
2 if(event.key === 'Enter'){
3 console.log('enter press here! ')
4 }
5}
6render: function(){
7 return(
8 <div>
9 <input type="text" id="one" onKeyPress={this.handleKeyPress} />
10 </div>
11 );
12}