Skip to content

Commit

Permalink
fix: allow nesting routers
Browse files Browse the repository at this point in the history
remix-run#7375 (comment)

Signed-off-by: Christian Stewart <christian@aperture.us>
  • Loading branch information
paralin committed Dec 20, 2023
1 parent fc5caa8 commit 2d9348a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/react-router/lib/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,6 @@ export function Router({
static: staticProp = false,
future,
}: RouterProps): React.ReactElement | null {
invariant(
!useInRouterContext(),
`You cannot render a <Router> inside another <Router>.` +
` You should never have more than one in your app.`
);

// Preserve trailing slashes on basename, so we can let the user control
// the enforcement of trailing slashes throughout the app
let basename = basenameProp.replace(/^\/*/, "/");
Expand Down

0 comments on commit 2d9348a

Please sign in to comment.