Skip to content
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

Relative <Route> and <Link> #4355

Closed
wants to merge 3 commits into from
Closed

Relative <Route> and <Link> #4355

wants to merge 3 commits into from

Commits on Feb 3, 2017

  1. resolve relative paths

    The function resolveLocation can be used for resolving location
    descriptors and strings. Resolving is done with a modified version of RFC
    3986's resolution algorithm in which the trailing URL segment is not removed. This allows a <Link> to be resolved relative to the <Route> that is is located in. resolveLocation supports pathnames that include double dot notation (../foo).
    
    The function simpleResolve can be used for resolving <Route> and <Switch>
    pathnames. This simply joins the pathname (iff it is not absolute) to the
    base pathname using a forward slash.
    pshrmn committed Feb 3, 2017
    Configuration menu
    Copy the full SHA
    d6b1290 View commit details
    Browse the repository at this point in the history
  2. resolve Route/Switch in matchPath using match.url

    The parent match is passed to matchPath. match.url is used for resolving instead of math.path to simplify matching (just match a string instead of having to parse params). matchPath will combine its parent's params with its params (favoring its params when there are conflicts)
    pshrmn committed Feb 3, 2017
    Configuration menu
    Copy the full SHA
    04fd26a View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2017

  1. Configuration menu
    Copy the full SHA
    95b8aea View commit details
    Browse the repository at this point in the history