Skip to content

Commit 37f2d36

Browse files
chore: update docs links (#9644)
1 parent 6a6bf0c commit 37f2d36

File tree

10 files changed

+38
-38
lines changed

10 files changed

+38
-38
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ body:
1616
you ask a question, here are some resources to get help first:
1717
1818
- Read the docs: https://reactrouter.com
19-
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/main/start/faq
20-
- Explore examples: https://reactrouter.com/docs/en/main/start/examples
19+
- Check out the list of frequently asked questions: https://reactrouter.com/start/faq
20+
- Explore examples: https://reactrouter.com/start/examples
2121
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
2222
- Ask in chat: https://discord.gg/6RyV8n8yyM
2323

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ body:
1616
you ask a question, here are some resources to get help first:
1717
1818
- Read the docs: https://reactrouter.com
19-
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/main/start/faq
20-
- Explore examples: https://reactrouter.com/docs/en/main/start/examples
19+
- Check out the list of frequently asked questions: https://reactrouter.com/start/faq
20+
- Explore examples: https://reactrouter.com/start/examples
2121
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
2222
- Ask in chat: https://discord.gg/6RyV8n8yyM
2323
- type: textarea

docs/start/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ export default function Index() {
12461246
This is a demo for React Router.
12471247
<br />
12481248
Check out{" "}
1249-
<a href="https://reactrouter.com/">
1249+
<a href="https://reactrouter.com">
12501250
the docs at reactrouter.com
12511251
</a>
12521252
.

packages/react-router-dom/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov
6161

6262
6363

64-
[rr-docs]: https://reactrouter.com/
65-
[rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
66-
[rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
64+
[rr-docs]: https://reactrouter.com
65+
[rr-feature-overview]: https://reactrouter.com/start/overview
66+
[rr-tutorial]: https://reactrouter.com/start/tutorial

packages/react-router-dom/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ enum DataRouterStateHook {
672672
function getDataRouterConsoleError(
673673
hookName: DataRouterHook | DataRouterStateHook
674674
) {
675-
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
675+
return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;
676676
}
677677

678678
function useDataRouterContext(hookName: DataRouterHook) {

packages/react-router/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov
4848

4949
- `@remix-run/[email protected]`
5050

51-
[rr-docs]: https://reactrouter.com/
52-
[rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
53-
[rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
51+
[rr-docs]: https://reactrouter.com
52+
[rr-feature-overview]: https://reactrouter.com/start/overview
53+
[rr-tutorial]: https://reactrouter.com/start/tutorial

packages/react-router/lib/components.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export interface MemoryRouterProps {
120120
/**
121121
* A <Router> that stores all entries in memory.
122122
*
123-
* @see https://reactrouter.com/docs/en/main/router-components/memory-router
123+
* @see https://reactrouter.com/router-components/memory-router
124124
*/
125125
export function MemoryRouter({
126126
basename,
@@ -170,7 +170,7 @@ export interface NavigateProps {
170170
* able to use hooks. In functional components, we recommend you use the
171171
* `useNavigate` hook instead.
172172
*
173-
* @see https://reactrouter.com/docs/en/main/components/navigate
173+
* @see https://reactrouter.com/components/navigate
174174
*/
175175
export function Navigate({
176176
to,
@@ -215,7 +215,7 @@ export interface OutletProps {
215215
/**
216216
* Renders the child route's element, if there is one.
217217
*
218-
* @see https://reactrouter.com/docs/en/main/components/outlet
218+
* @see https://reactrouter.com/components/outlet
219219
*/
220220
export function Outlet(props: OutletProps): React.ReactElement | null {
221221
return useOutlet(props.context);
@@ -258,7 +258,7 @@ export type RouteProps = PathRouteProps | LayoutRouteProps | IndexRouteProps;
258258
/**
259259
* Declares an element that should be rendered at a certain URL path.
260260
*
261-
* @see https://reactrouter.com/docs/en/main/components/route
261+
* @see https://reactrouter.com/components/route
262262
*/
263263
export function Route(_props: RouteProps): React.ReactElement | null {
264264
invariant(
@@ -284,7 +284,7 @@ export interface RouterProps {
284284
* router that is more specific to your environment such as a <BrowserRouter>
285285
* in web browsers or a <StaticRouter> for server rendering.
286286
*
287-
* @see https://reactrouter.com/docs/en/main/router-components/router
287+
* @see https://reactrouter.com/router-components/router
288288
*/
289289
export function Router({
290290
basename: basenameProp = "/",
@@ -366,7 +366,7 @@ export interface RoutesProps {
366366
* A container for a nested tree of <Route> elements that renders the branch
367367
* that best matches the current location.
368368
*
369-
* @see https://reactrouter.com/docs/en/main/components/routes
369+
* @see https://reactrouter.com/components/routes
370370
*/
371371
export function Routes({
372372
children,
@@ -536,7 +536,7 @@ function ResolveAwait({
536536
* either a `<Route>` element or an array of them. Used internally by
537537
* `<Routes>` to create a route config from its children.
538538
*
539-
* @see https://reactrouter.com/docs/en/main/utils/create-routes-from-children
539+
* @see https://reactrouter.com/utils/create-routes-from-children
540540
*/
541541
export function createRoutesFromChildren(
542542
children: React.ReactNode,

packages/react-router/lib/hooks.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
* Returns the full href for the given "to" value. This is useful for building
4646
* custom links that are also accessible and preserve right-click behavior.
4747
*
48-
* @see https://reactrouter.com/docs/en/main/hooks/use-href
48+
* @see https://reactrouter.com/hooks/use-href
4949
*/
5050
export function useHref(
5151
to: To,
@@ -78,7 +78,7 @@ export function useHref(
7878
/**
7979
* Returns true if this component is a descendant of a <Router>.
8080
*
81-
* @see https://reactrouter.com/docs/en/main/hooks/use-in-router-context
81+
* @see https://reactrouter.com/hooks/use-in-router-context
8282
*/
8383
export function useInRouterContext(): boolean {
8484
return React.useContext(LocationContext) != null;
@@ -92,7 +92,7 @@ export function useInRouterContext(): boolean {
9292
* "routing" in your app, and we'd like to know what your use case is. We may
9393
* be able to provide something higher-level to better suit your needs.
9494
*
95-
* @see https://reactrouter.com/docs/en/main/hooks/use-location
95+
* @see https://reactrouter.com/hooks/use-location
9696
*/
9797
export function useLocation(): Location {
9898
invariant(
@@ -109,7 +109,7 @@ export function useLocation(): Location {
109109
* Returns the current navigation action which describes how the router came to
110110
* the current location, either by a pop, push, or replace on the history stack.
111111
*
112-
* @see https://reactrouter.com/docs/en/main/hooks/use-navigation-type
112+
* @see https://reactrouter.com/hooks/use-navigation-type
113113
*/
114114
export function useNavigationType(): NavigationType {
115115
return React.useContext(LocationContext).navigationType;
@@ -120,7 +120,7 @@ export function useNavigationType(): NavigationType {
120120
* This is useful for components that need to know "active" state, e.g.
121121
* <NavLink>.
122122
*
123-
* @see https://reactrouter.com/docs/en/main/hooks/use-match
123+
* @see https://reactrouter.com/hooks/use-match
124124
*/
125125
export function useMatch<
126126
ParamKey extends ParamParseKey<Path>,
@@ -152,7 +152,7 @@ export interface NavigateFunction {
152152
* Returns an imperative method for changing the location. Used by <Link>s, but
153153
* may also be used by other elements to change the location.
154154
*
155-
* @see https://reactrouter.com/docs/en/main/hooks/use-navigate
155+
* @see https://reactrouter.com/hooks/use-navigate
156156
*/
157157
export function useNavigate(): NavigateFunction {
158158
invariant(
@@ -225,7 +225,7 @@ const OutletContext = React.createContext<unknown>(null);
225225
/**
226226
* Returns the context (if provided) for the child route at this level of the route
227227
* hierarchy.
228-
* @see https://reactrouter.com/docs/en/main/hooks/use-outlet-context
228+
* @see https://reactrouter.com/hooks/use-outlet-context
229229
*/
230230
export function useOutletContext<Context = unknown>(): Context {
231231
return React.useContext(OutletContext) as Context;
@@ -235,7 +235,7 @@ export function useOutletContext<Context = unknown>(): Context {
235235
* Returns the element for the child route at this level of the route
236236
* hierarchy. Used internally by <Outlet> to render child routes.
237237
*
238-
* @see https://reactrouter.com/docs/en/main/hooks/use-outlet
238+
* @see https://reactrouter.com/hooks/use-outlet
239239
*/
240240
export function useOutlet(context?: unknown): React.ReactElement | null {
241241
let outlet = React.useContext(RouteContext).outlet;
@@ -251,7 +251,7 @@ export function useOutlet(context?: unknown): React.ReactElement | null {
251251
* Returns an object of key/value pairs of the dynamic params from the current
252252
* URL that were matched by the route path.
253253
*
254-
* @see https://reactrouter.com/docs/en/main/hooks/use-params
254+
* @see https://reactrouter.com/hooks/use-params
255255
*/
256256
export function useParams<
257257
ParamsOrKey extends string | Record<string, string | undefined> = string
@@ -266,7 +266,7 @@ export function useParams<
266266
/**
267267
* Resolves the pathname of the given `to` value against the current location.
268268
*
269-
* @see https://reactrouter.com/docs/en/main/hooks/use-resolved-path
269+
* @see https://reactrouter.com/hooks/use-resolved-path
270270
*/
271271
export function useResolvedPath(
272272
to: To,
@@ -297,7 +297,7 @@ export function useResolvedPath(
297297
* elements in the tree must render an <Outlet> to render their child route's
298298
* element.
299299
*
300-
* @see https://reactrouter.com/docs/en/main/hooks/use-routes
300+
* @see https://reactrouter.com/hooks/use-routes
301301
*/
302302
export function useRoutes(
303303
routes: RouteObject[],
@@ -650,7 +650,7 @@ enum DataRouterStateHook {
650650
function getDataRouterConsoleError(
651651
hookName: DataRouterHook | DataRouterStateHook
652652
) {
653-
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
653+
return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;
654654
}
655655

656656
function useDataRouterContext(hookName: DataRouterHook) {

packages/router/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ For an overview of the features provided by `react-router`, we recommend you go
3636

3737
For an overview of the features provided by `@remix-run/router`, please check out the [`README`][remix-router-readme].
3838

39-
[rr-docs]: https://reactrouter.com/
40-
[rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
41-
[rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
39+
[rr-docs]: https://reactrouter.com
40+
[rr-feature-overview]: https://reactrouter.com/start/overview
41+
[rr-tutorial]: https://reactrouter.com/start/tutorial
4242
[remix-router-readme]: https://github.com/remix-run/react-router/blob/main/packages/router/README.md

packages/router/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export function convertRoutesToDataRoutes(
306306
/**
307307
* Matches the given routes to a location and returns the match data.
308308
*
309-
* @see https://reactrouter.com/docs/en/main/utils/match-routes
309+
* @see https://reactrouter.com/utils/match-routes
310310
*/
311311
export function matchRoutes<
312312
RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject
@@ -528,7 +528,7 @@ function matchRouteBranch<
528528
/**
529529
* Returns a path with params interpolated.
530530
*
531-
* @see https://reactrouter.com/docs/en/main/utils/generate-path
531+
* @see https://reactrouter.com/utils/generate-path
532532
*/
533533
export function generatePath<Path extends string>(
534534
path: Path,
@@ -606,7 +606,7 @@ type Mutable<T> = {
606606
* Performs pattern matching on a URL pathname and returns information about
607607
* the match.
608608
*
609-
* @see https://reactrouter.com/docs/en/main/utils/match-path
609+
* @see https://reactrouter.com/utils/match-path
610610
*/
611611
export function matchPath<
612612
ParamKey extends ParamParseKey<Path>,
@@ -805,7 +805,7 @@ export function warning(cond: any, message: string): void {
805805
/**
806806
* Returns a resolved path object relative to the given pathname.
807807
*
808-
* @see https://reactrouter.com/docs/en/main/utils/resolve-path
808+
* @see https://reactrouter.com/utils/resolve-path
809809
*/
810810
export function resolvePath(to: To, fromPathname = "/"): Path {
811811
let {

0 commit comments

Comments
 (0)