Skip to content

Commit fa7315e

Browse files
hsingh23timdorr
authored andcommitted
Update migrating.md (remix-run#5337)
* Update migrating.md Show you can render redirect in switch. * Update migrating.md
1 parent 6536e93 commit fa7315e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react-router/docs/guides/migrating.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,10 @@ In v4, you can achieve the same functionality using `<Redirect>`.
162162
// v4
163163
<Route exact path="/" render={() => <Redirect to="/welcome" component={App} />} />
164164

165+
<Switch >
166+
<Route exact path="/" component={App} />
167+
<Route path="/login" component={Login} />
168+
<Redirect path="*" to="/" />
169+
</Switch>
170+
165171
```

0 commit comments

Comments
 (0)