Skip to content

[Docs]: Upgrading from V6 #13207

@amgowda42

Description

@amgowda42

Splat will not directly catch inside the child route if we use path "*" and element as Parent Component.

If you define dashboard/* directly in Route, React Router expects child routes to be handled inside Dashboard. However, the issue happens when React Router doesn’t recognize the child properly due to missing hierarchy.

<Routes>
  <Route path="/" element={<Home />} />
-  <Route path="dashboard/*" element={<Dashboard />} />
+  <Route path="dashboard">
+    <Route path="*" element={<Dashboard />} />
+  </Route>
</Routes>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions