Question: Here's the code

```
import React, { Component, useImperativeHandle } from 'react';

class SearchBar extends Component {
render() {
return <input onChange={this.onInputChange} />;
}
onInputChange(event) {
  console.log(event)
 }
}

export default SearchBar;

```

There's no error still on input nothing get the console logged.

[Screenshot of input and console](https://i.stack.imgur.com/bBwhG.png)

Answer: 
You need to bind your event handler to your class component as below

```
 import React, { Component, useImperativeHandle } from 'react';

 class SearchBar extends Component {
   constructor(props) {
     super(props);
     this.onInputChange = this.onInputChangebind(this); //You NEEDED THIS
  }

  render() {
    return <input onChange={this.onInputChange} />;
  }
  onInputChange(event) {
    console.log(event)
  }
  }

export default SearchBar;

```
Works on my side... i highlighted the console.log outputs as shown on picture
[![enter image description here](https://i.stack.imgur.com/xnhb6.png)](https://i.stack.imgur.com/xnhb6.png)

otherwise if you needed to see the words you typed on the input tag you can just do
`console.log(event.target.value)` `instead of console.log(event)`