1.一般寫在所有路由注冊的最下方,當所有路由都無法匹配時,跳轉到Redirect指定的路由
2.具體編碼:
<Switch>
<Route path="/about" component={About}/>
<Route path="/home" component={Home}/>
<Redirect to="/about"/>
</Switch>