title: How to export a react component with 'withRouter' and 'withTranslation'
body: <p>I'm trying to export a class component with <code>withRouter</code> and <code>withTranslation</code>. For localization, I'm using <code>i18next</code> and <code>react-i18next</code>. This works fine in react with javascript. But I'm using react with typescript.</p>
  <p>Component -</p>
  <pre><code>class TableSorter extends React.Component&lt;any, any&gt; {
    state = {
      data: [],
      pagination: {},
      loading: false,
    };
    componentWillReceiveProps(nextProps: any) {
      nextProps.concussionDataProp.sort(this.compare);
    }
    compare = (a: any, b: any) =&gt; {
      ///....
    };
  
    render() {
      const columns = [
        {
          title: &quot;Firstname&quot;,
          dataIndex: &quot;firstName&quot;,
          className: &quot;col-first-name&quot;,
        },
        {
          title: &quot;Lastname&quot;,
          dataIndex: &quot;lastName&quot;,
          className: &quot;col-last-name&quot;,
        },
        {
          title: &quot;Position&quot;,
          dataIndex: &quot;position&quot;,
          className: &quot;col-position&quot;,
        }
      ];
  
      return (
        &lt;Table
          columns={columns}
          rowKey={Math.floor(Math.random() * 10).toString()}
          dataSource={this.props.concussionDataProp}
          pagination={false}
          loading={this.state.loading}
          onRow={(record: any) =&gt; {
            return {
              onClick: () =&gt; {
                this.props.history.push({
                  pathname: `/athletes/${record.id}`,
                });
              },
            };
          }}
        /&gt;
        //
      );
    }
  }
  
  export default withRouter(withTranslation()(TableSorter));
  </code></pre>
  <p>But I'm getting the following error when compiling.</p>
  <p><code>Argument of type 'ComponentType&lt;Pick&lt;any, string | number | symbol&gt;&gt;' is not assignable to parameter of type 'ComponentClass&lt;RouteComponentProps&lt;any, StaticContext, PoorMansUnknown&gt;, any&gt; | FunctionComponent&lt;RouteComponentPro ps&lt;any, StaticContext, PoorMansUnknown&gt;&gt; | (FunctionComponent&lt;...&gt; &amp; ComponentClass&lt;...&gt;) | (ComponentClass&lt;...&gt; &amp; FunctionComponent&lt;...&gt;)'. Type 'ComponentClass&lt;Pick&lt;any, string | number | symbol&gt;, any&gt;' is not assignable to type 'ComponentClass&lt;RouteComponentProps&lt;any, StaticContext, PoorMansUnknown&gt;, any&gt; | FunctionComponent&lt;RouteComponentProps&lt;any, StaticCon text, PoorMansUnknown&gt;&gt; | (FunctionComponent&lt;...&gt; &amp; ComponentClass&lt;...&gt;) | (ComponentClass&lt;...&gt; &amp; FunctionComponent&lt;...&gt;)'. Type 'ComponentClass&lt;Pick&lt;any, string | number | symbol&gt;, any&gt;' is not assignable to type 'ComponentClass&lt;RouteComponentProps&lt;any, StaticContext, PoorMansUnknown&gt;, any&gt;'. Construct signature return types 'Component&lt;Pick&lt;any, string | number | symbol&gt;, any, any&gt;' and 'Component&lt;RouteComponentProps&lt;any, StaticContext, PoorMansUnknown&gt;, any, any&gt;' are incompatible. The types of 'props' are incompatible between these types. Type 'Readonly&lt;Pick&lt;any, string | number | symbol&gt;&gt; &amp; Readonly&lt;{ children?: ReactNode; }&gt;' is not assignable to type 'Readonly&lt;RouteComponentProps&lt;any, StaticContext, PoorMansUnknown&gt;&gt; &amp; Readonly&lt;{ children?: ReactN ode; }&gt;'. Type 'Readonly&lt;Pick&lt;any, string | number | symbol&gt;&gt; &amp; Readonly&lt;{ children?: ReactNode; }&gt;' is missing the following properties from type 'Readonly&lt;RouteComponentProps&lt;any, StaticContext, PoorMansUnknown&gt;&gt;': histor y, location, match</code></p>
  <p>Can anyone help me with this?</p>