I am using the next
version of React Router, and it seems to be dropping params. I expect the redirect below to retain the value of channelId
, but the to
route uses the literal string ":channelId
" in the path instead.
<Switch>
<Route exact path="/" component={Landing} />
<Route path="/channels/:channelId/modes/:modeId" component={Window} />
<Redirect
from="/channels/:channelId"
to="/channels/:channelId/modes/window" />
</Switch>
This looks like a resolved issue, but it's not working. Is there something else I need to pass to the to
route?