import { router } from 'dva' ; import Component from './Component' ; import React , { FC } from 'react' ; const { Switch , Route , useRouteMatch } = router ; const Home = ( ) => { const { path = '/demo' } = useRouteMatch ( ) ; return ( < Switch > < Route exact path = { `${ path }` } component = { Component } / > < /Switch>); } ; export default Home ;