Rendering a <Redirect> will navigate to a new location. The new location will override the current location in the history stack, like server-side redirects (HTTP 3xx) do
From: A pathname to redirect from. This can only be used to match a location when rendering a <Redirect> inside of a <Switch>. See <Switch children> for more details.
与之前版本不同,在 react-router4 中,渲染
<redirect>
组件会直接跳转到目标位置。from 属性仅用于<redirect>
包裹着<Switch>
组件中的时候。react-router4 文档 redirect