-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match params are mixed with search using react-router-config #5662
Comments
We don't process query strings at all in 4.0. You would need to add an optional section to your path pattern to make that work, but it would be up to you to parse the query string further. |
When processing this url 1/ Is it intended to have a different The |
RR uses Alternatively, you should be creating a const history = createMemoryHistory({ initialEntries: [req.url] });
matchRoutes(routes, history.location.pathname); |
This change is made on the basis of this issue in React Router: remix-run/react-router#5662. By passing the entire URL to React Router for the server-side render, we were running into cases where the route was not being matched as expected. For example, if the route path was "/projects/:id" and the url was http://manifold.dev/projects/some-project?foo=bar, the server- side render would be passed a project param of `some-project?foo=bar` rather than the expected `some-project`. This change solves that problem, but I'm concerned that we're no longer passing any query params from the URL to the server-side render, which may lead to mis- matches between SSR and CSR.
This change is made on the basis of this issue in React Router: remix-run/react-router#5662. By passing the entire URL to React Router for the server-side render, we were running into cases where the route was not being matched as expected. For example, if the route path was "/projects/:id" and the url was http://manifold.dev/projects/some-project?foo=bar, the server- side render would be passed a project param of `some-project?foo=bar` rather than the expected `some-project`. This change solves that problem, but I'm concerned that we're no longer passing any query params from the URL to the server-side render, which may lead to mis- matches between SSR and CSR.
This change is made on the basis of this issue in React Router: remix-run/react-router#5662. By passing the entire URL to React Router for the server-side render, we were running into cases where the route was not being matched as expected. For example, if the route path was "/projects/:id" and the url was http://manifold.dev/projects/some-project?foo=bar, the server- side render would be passed a project param of `some-project?foo=bar` rather than the expected `some-project`. This change solves that problem, but I'm concerned that we're no longer passing any query params from the URL to the server-side render, which may lead to mis- matches between SSR and CSR.
This change is made on the basis of this issue in React Router: remix-run/react-router#5662. By passing the entire URL to React Router for the server-side render, we were running into cases where the route was not being matched as expected. For example, if the route path was "/projects/:id" and the url was http://manifold.dev/projects/some-project?foo=bar, the server- side render would be passed a project param of `some-project?foo=bar` rather than the expected `some-project`. This change solves that problem, but I'm concerned that we're no longer passing any query params from the URL to the server-side render, which may lead to mis- matches between SSR and CSR.
Hello,
I have an issue on server with the value of matched params:
Rendering
/items/10
,match.params.id
will equal 10 as expectedThough rendering
/items/10?test=1
,match.params.id
equals10?test=1
, the search gets included in params.Here is how I declare a route to be used with
react-router-config
:Here is how I retrieve and pass the
match
to myfetchData
producing the results above, usingreact-router-config
:With "react-router-config": "1.0.0-beta.4",
The text was updated successfully, but these errors were encountered: