Skip to content

Conversation

brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Jun 8, 2022

Continuation of #8697

Closes #8350

<Route element={<Outlet />}>
<Route
path="page"
element={<Navigate to="../../about" />}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryanflorence Quick double check here that this double ../.. would be the expected relative path to the /about route?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<Route path="about" />
<Route path="home" element={<Outlet />}>
  <Route element={<Outlet />}>
    <Route element={<Outlet />}>
      <Route element={<Outlet />}>
        <Route
          path="page"
          element={<Navigate to="../../about" />}
        />

Should ignore all the pathless routes, so essentially we're talking about this:

<Route path="about" />
<Route path="home" element={<Outlet />}>
  <Route
    path="page"
    element={<Navigate to="../../about" />}
  />
  • .. goes up to /home route
  • .. x2 goes up to /
  • about goes to /about

So yeah, that sounds right!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Relative navigation issue while navigating from "index" route: ".." doesn't works, I must use "../.." to go back

3 participants