需求,设置Product为默认路由
<Route path="/area" component={Area} />
<Route path="/product" component={Product} />
方法1
<Route path="/" component={Product} exact />
<Route path="/area" component={Area} />
<Route path="/product" component={Product} />
方法2
<Redirect path="/" to="/product" />
<Route path="/area" component={Area} />
<Route path="/product" component={Product} />
区别:方法2用 Redirect 会重定向url,推荐方法1