react-router icon indicating copy to clipboard operation
react-router copied to clipboard

Redirects should merge properties before validating

Open TimothyRHuertas opened this issue 11 years ago • 2 comments

For backward compatibility when a user navigates to my-space/search I want to redirect to my-space/search/partners. I tried the following approach, but got 'Uncaught Error: Invariant Violation: Cannot find a route named ":space/search/:searchType"'.

 <Route name="app" path="/" handler={App}>
    <Route name="search" path=":space/search/:searchType" handler={ArtworkSetListPage}/>
    <Redirect from=":space/search" to=":space/search/:searchType" params={{searchType: "partners"}}/>
  </Route>

I think the router should merge the arguments (:space and :searchType) before doing the validation.

TimothyRHuertas avatar Apr 17 '15 22:04 TimothyRHuertas

hi tim!

duplicate #1034 (I think)

ryanflorence avatar Jun 17 '15 04:06 ryanflorence

Agreed.

On Jun 16, 2015, at 9:32 PM, Ryan Florence [email protected] wrote:

hi tim!

duplicate #1034 (I think)

— Reply to this email directly or view it on GitHub.

TimothyRHuertas avatar Jun 17 '15 15:06 TimothyRHuertas