import * as React from 'react' ; import { Route , RouteProps } from 'react-router-dom' ; import { CustomRoute } from '../types' ; example export const RouteWithoutLayout = ( { noLayout , ... props } ) => < Route < CustomRoute > { ... props } / > ; RouteWithoutLayout . defaultProps = { noLayout : true , } ; export type RouteWithoutLayoutProps = RouteProps & { noLayout ? : boolean ; } ;