Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/react-router-dom/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from "react";
import type { BrowserHistory, HashHistory, History } from "history";
import { createBrowserHistory, createHashHistory, createPath } from "history";
import { createBrowserHistory, createHashHistory } from "history";
import {
createPath,
MemoryRouter,
Navigate,
Outlet,
Expand All @@ -12,6 +13,7 @@ import {
generatePath,
matchRoutes,
matchPath,
parsePath,
resolvePath,
renderMatches,
useHref,
Expand Down Expand Up @@ -51,6 +53,7 @@ function warning(cond: boolean, message: string): void {

// Note: Keep in sync with react-router exports!
export {
createPath,
MemoryRouter,
Navigate,
Outlet,
Expand All @@ -61,6 +64,7 @@ export {
generatePath,
matchRoutes,
matchPath,
parsePath,
renderMatches,
resolvePath,
useHref,
Expand All @@ -77,6 +81,7 @@ export {
};

export type {
Hash,
Location,
Path,
To,
Expand All @@ -96,6 +101,7 @@ export type {
LayoutRouteProps,
IndexRouteProps,
RouterProps,
Pathname,
RoutesProps
} from "react-router";

Expand Down
9 changes: 7 additions & 2 deletions packages/react-router/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import * as React from "react";
import type {
Hash,
History,
InitialEntry,
Location,
MemoryHistory,
Path,
Pathname,
Search,
To
} from "history";
import {
Action as NavigationType,
createMemoryHistory,
parsePath
parsePath,
createPath
} from "history";

export type { Location, Path, To, NavigationType };
export { parsePath, createPath, NavigationType };
export type { Hash, Location, Path, Pathname, Search, To };

function invariant(cond: any, message: string): asserts cond {
if (!cond) throw new Error(message);
Expand Down