Expected 'this' to be used by class method : <p>In my class, eslint is complaining "Expected 'this' to be used by class method 'getUrlParams'</p>

<p>Here is my class:</p>

<pre><code>class PostSearch extends React.Component {
  constructor(props) {
    super(props);
    this.getSearchResults();
  }

  getUrlParams(queryString) {
    const hashes = queryString.slice(queryString.indexOf('?') + 1).split('&amp;');
    const params = {};

    hashes.forEach((hash) =&gt; {
      const [key, val] = hash.split('=');
      params[key] = decodeURIComponent(val);
    });

    return params;
  }

  getSearchResults() {
    const { terms, category } = this.getUrlParams(this.props.location.search);
    this.props.dispatch(Actions.fetchPostsSearchResults(terms, category));
  }

  render() {
    return (
      &lt;div&gt;
        &lt;HorizontalLine /&gt;
        &lt;div className="container"&gt;
          &lt;Col md={9} xs={12}&gt;
            &lt;h1 className="aboutHeader"&gt;Test&lt;/h1&gt;
          &lt;/Col&gt;
          &lt;Col md={3} xs={12}&gt;
            &lt;SideBar /&gt;
          &lt;/Col&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    );
  }
}
</code></pre>

<p>What is the best approach to solve this or refactor this component?</p>
