I have a problem with the code below:
the event.target.value which the state "searchQuery" is set to is ok, but when I pass it into the redux action handle change (this.props.setSearchQuery), I always get one character less.
For example, if I type in A, the state is A but the redux state (showSearchQuery is '')
If I type in AB then showSearchQuery becomes A,
if I type in ABC it becomes AB.
Any ideas? Thanks!

search box component:

```
    import React from 'react';
    import './search-box.styles.css';
    import { connect } from 'react-redux';
    import { setShowSearchQuery } from '../../redux/actions/index';

    class SearchBox extends React.Component {
      constructor() {
        super();

        this.state = {
          searchQuery: '',
        };
      }

      handleChange = (event) => {
        // console.log('EVENT TARGET VAL', event.target.value);
        this.setState({ searchQuery: event.target.value });
        let query = this.state.searchQuery;
        this.props.setShowSearchQuery(query);
      };

      render() {
        return (
          <input
            type='search'
            placeholder={'Search by title'}
            onChange={this.handleChange}
          />
        );
      }
    }

    const mapStateToProps = (state) => {
      return {
        showSearchQuery: state.showSearchQuery,
        loading: state.loading,
      };
    };

    export default connect(mapStateToProps, { setShowSearchQuery })(SearchBox);

```

action:

```
    export const setShowSearchQuery = (data) => {
      return {
        type: SET_SHOW_SEARCH_QUERY_SUCCESS,
        data,
      };
    };

```

reducer:

```
    import { setShowSearchQueryUtil } from './shows.utils';

     case SET_SHOW_SEARCH_QUERY_SUCCESS:
          return {
            ...state,
            showSearchQuery: setShowSearchQueryUtil(action.data),
            loading: false,
          };

```

utils function:

```
    export const setShowSearchQueryUtil = (query) => {
      return query;
    };

```

Also, if I had for example "ABC", then "showSearchQuery" is AB, but if I delete one character and I only have A in input, THEN IT BECOEMS ABC