Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

URL query compatibility with react-router routes and location #638

@peterlazzarino

Description

@peterlazzarino

I've been using asp prerendering for an application that uses the query string to for fetching data that I want rendered on the server. I noticed while following the react example that the query string was being encoded incorrectly but only on the server side when the location is created in createServerRenderer and then passed into react router.

I traced it to react-router and creatememoryhistory expecting the query field on the location object to be a key value pair object and not a string like it is in the createserverrenderer params. Since you are using url.parse and there is an option to pass true for it be an object, can this be exposed as a parameter somewhere? Using this allows me to use the query on the server and client. I'm not sure of the implications of switching this to true and then submitting a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions