title: What type to add to props.location.state from React.router.dom in TypeScript
body: <p>I've tried to get an object from props.location.state but TypeScript is giving me an error. This is the only way I could get the object from state:</p>
  <pre><code>import React, { FC } from 'react';
  import { RouteComponentProps } from 'react-router-dom';
  
  import AssetData from '../interfaces/dataInterface';
  
  type Props = {
      location: RouteComponentProps;
  };
  
  const DetailPage: FC&lt;Props&gt; = ({ location }: Props) =&gt; {
      const { state }: any = location;
      const data: AssetData = state.movieData;
  
      return &lt;div style={{ fontSize: '65px', marginTop: '100px' }}&gt;{data?.title}&lt;/div&gt;;
  };
  
  export default DetailPage;
  </code></pre>