Check out example codes for "reach router path typescript error". It will help you in understanding the concepts better.

Code Example 1

import React, { FunctionComponent } from "react";
import { RouteComponentProps } from "@reach/router";

type Props = { component: FunctionComponent } & RouteComponentProps;

const Route: FunctionComponent<Props> = ({ component: Component, ...rest }) => (
  <Component {...rest} />
);

export default Route;

Learn ReactJs, React Native from akashmittal.com