Skip to content

Commit

Permalink
chore: update docs links (#9644)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Nov 28, 2022
1 parent 6a6bf0c commit 37f2d36
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Expand Up @@ -16,8 +16,8 @@ body:
you ask a question, here are some resources to get help first:
- Read the docs: https://reactrouter.com
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/main/start/faq
- Explore examples: https://reactrouter.com/docs/en/main/start/examples
- Check out the list of frequently asked questions: https://reactrouter.com/start/faq
- Explore examples: https://reactrouter.com/start/examples
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
- Ask in chat: https://discord.gg/6RyV8n8yyM
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Expand Up @@ -16,8 +16,8 @@ body:
you ask a question, here are some resources to get help first:
- Read the docs: https://reactrouter.com
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/main/start/faq
- Explore examples: https://reactrouter.com/docs/en/main/start/examples
- Check out the list of frequently asked questions: https://reactrouter.com/start/faq
- Explore examples: https://reactrouter.com/start/examples
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
- Ask in chat: https://discord.gg/6RyV8n8yyM
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion docs/start/tutorial.md
Expand Up @@ -1246,7 +1246,7 @@ export default function Index() {
This is a demo for React Router.
<br />
Check out{" "}
<a href="https://reactrouter.com/">
<a href="https://reactrouter.com">
the docs at reactrouter.com
</a>
.
Expand Down
6 changes: 3 additions & 3 deletions packages/react-router-dom/CHANGELOG.md
Expand Up @@ -61,6 +61,6 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov

- `react-router@6.4.0`

[rr-docs]: https://reactrouter.com/
[rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
[rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
[rr-docs]: https://reactrouter.com
[rr-feature-overview]: https://reactrouter.com/start/overview
[rr-tutorial]: https://reactrouter.com/start/tutorial
2 changes: 1 addition & 1 deletion packages/react-router-dom/index.tsx
Expand Up @@ -672,7 +672,7 @@ enum DataRouterStateHook {
function getDataRouterConsoleError(
hookName: DataRouterHook | DataRouterStateHook
) {
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;
}

function useDataRouterContext(hookName: DataRouterHook) {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-router/CHANGELOG.md
Expand Up @@ -48,6 +48,6 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov

- `@remix-run/router@1.0.0`

[rr-docs]: https://reactrouter.com/
[rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
[rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
[rr-docs]: https://reactrouter.com
[rr-feature-overview]: https://reactrouter.com/start/overview
[rr-tutorial]: https://reactrouter.com/start/tutorial
14 changes: 7 additions & 7 deletions packages/react-router/lib/components.tsx
Expand Up @@ -120,7 +120,7 @@ export interface MemoryRouterProps {
/**
* A <Router> that stores all entries in memory.
*
* @see https://reactrouter.com/docs/en/main/router-components/memory-router
* @see https://reactrouter.com/router-components/memory-router
*/
export function MemoryRouter({
basename,
Expand Down Expand Up @@ -170,7 +170,7 @@ export interface NavigateProps {
* able to use hooks. In functional components, we recommend you use the
* `useNavigate` hook instead.
*
* @see https://reactrouter.com/docs/en/main/components/navigate
* @see https://reactrouter.com/components/navigate
*/
export function Navigate({
to,
Expand Down Expand Up @@ -215,7 +215,7 @@ export interface OutletProps {
/**
* Renders the child route's element, if there is one.
*
* @see https://reactrouter.com/docs/en/main/components/outlet
* @see https://reactrouter.com/components/outlet
*/
export function Outlet(props: OutletProps): React.ReactElement | null {
return useOutlet(props.context);
Expand Down Expand Up @@ -258,7 +258,7 @@ export type RouteProps = PathRouteProps | LayoutRouteProps | IndexRouteProps;
/**
* Declares an element that should be rendered at a certain URL path.
*
* @see https://reactrouter.com/docs/en/main/components/route
* @see https://reactrouter.com/components/route
*/
export function Route(_props: RouteProps): React.ReactElement | null {
invariant(
Expand All @@ -284,7 +284,7 @@ export interface RouterProps {
* router that is more specific to your environment such as a <BrowserRouter>
* in web browsers or a <StaticRouter> for server rendering.
*
* @see https://reactrouter.com/docs/en/main/router-components/router
* @see https://reactrouter.com/router-components/router
*/
export function Router({
basename: basenameProp = "/",
Expand Down Expand Up @@ -366,7 +366,7 @@ export interface RoutesProps {
* A container for a nested tree of <Route> elements that renders the branch
* that best matches the current location.
*
* @see https://reactrouter.com/docs/en/main/components/routes
* @see https://reactrouter.com/components/routes
*/
export function Routes({
children,
Expand Down Expand Up @@ -536,7 +536,7 @@ function ResolveAwait({
* either a `<Route>` element or an array of them. Used internally by
* `<Routes>` to create a route config from its children.
*
* @see https://reactrouter.com/docs/en/main/utils/create-routes-from-children
* @see https://reactrouter.com/utils/create-routes-from-children
*/
export function createRoutesFromChildren(
children: React.ReactNode,
Expand Down
24 changes: 12 additions & 12 deletions packages/react-router/lib/hooks.tsx
Expand Up @@ -45,7 +45,7 @@ import {
* Returns the full href for the given "to" value. This is useful for building
* custom links that are also accessible and preserve right-click behavior.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-href
* @see https://reactrouter.com/hooks/use-href
*/
export function useHref(
to: To,
Expand Down Expand Up @@ -78,7 +78,7 @@ export function useHref(
/**
* Returns true if this component is a descendant of a <Router>.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-in-router-context
* @see https://reactrouter.com/hooks/use-in-router-context
*/
export function useInRouterContext(): boolean {
return React.useContext(LocationContext) != null;
Expand All @@ -92,7 +92,7 @@ export function useInRouterContext(): boolean {
* "routing" in your app, and we'd like to know what your use case is. We may
* be able to provide something higher-level to better suit your needs.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-location
* @see https://reactrouter.com/hooks/use-location
*/
export function useLocation(): Location {
invariant(
Expand All @@ -109,7 +109,7 @@ export function useLocation(): Location {
* Returns the current navigation action which describes how the router came to
* the current location, either by a pop, push, or replace on the history stack.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-navigation-type
* @see https://reactrouter.com/hooks/use-navigation-type
*/
export function useNavigationType(): NavigationType {
return React.useContext(LocationContext).navigationType;
Expand All @@ -120,7 +120,7 @@ export function useNavigationType(): NavigationType {
* This is useful for components that need to know "active" state, e.g.
* <NavLink>.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-match
* @see https://reactrouter.com/hooks/use-match
*/
export function useMatch<
ParamKey extends ParamParseKey<Path>,
Expand Down Expand Up @@ -152,7 +152,7 @@ export interface NavigateFunction {
* Returns an imperative method for changing the location. Used by <Link>s, but
* may also be used by other elements to change the location.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-navigate
* @see https://reactrouter.com/hooks/use-navigate
*/
export function useNavigate(): NavigateFunction {
invariant(
Expand Down Expand Up @@ -225,7 +225,7 @@ const OutletContext = React.createContext<unknown>(null);
/**
* Returns the context (if provided) for the child route at this level of the route
* hierarchy.
* @see https://reactrouter.com/docs/en/main/hooks/use-outlet-context
* @see https://reactrouter.com/hooks/use-outlet-context
*/
export function useOutletContext<Context = unknown>(): Context {
return React.useContext(OutletContext) as Context;
Expand All @@ -235,7 +235,7 @@ export function useOutletContext<Context = unknown>(): Context {
* Returns the element for the child route at this level of the route
* hierarchy. Used internally by <Outlet> to render child routes.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-outlet
* @see https://reactrouter.com/hooks/use-outlet
*/
export function useOutlet(context?: unknown): React.ReactElement | null {
let outlet = React.useContext(RouteContext).outlet;
Expand All @@ -251,7 +251,7 @@ export function useOutlet(context?: unknown): React.ReactElement | null {
* Returns an object of key/value pairs of the dynamic params from the current
* URL that were matched by the route path.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-params
* @see https://reactrouter.com/hooks/use-params
*/
export function useParams<
ParamsOrKey extends string | Record<string, string | undefined> = string
Expand All @@ -266,7 +266,7 @@ export function useParams<
/**
* Resolves the pathname of the given `to` value against the current location.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-resolved-path
* @see https://reactrouter.com/hooks/use-resolved-path
*/
export function useResolvedPath(
to: To,
Expand Down Expand Up @@ -297,7 +297,7 @@ export function useResolvedPath(
* elements in the tree must render an <Outlet> to render their child route's
* element.
*
* @see https://reactrouter.com/docs/en/main/hooks/use-routes
* @see https://reactrouter.com/hooks/use-routes
*/
export function useRoutes(
routes: RouteObject[],
Expand Down Expand Up @@ -650,7 +650,7 @@ enum DataRouterStateHook {
function getDataRouterConsoleError(
hookName: DataRouterHook | DataRouterStateHook
) {
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;
}

function useDataRouterContext(hookName: DataRouterHook) {
Expand Down
6 changes: 3 additions & 3 deletions packages/router/CHANGELOG.md
Expand Up @@ -36,7 +36,7 @@ For an overview of the features provided by `react-router`, we recommend you go

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

[rr-docs]: https://reactrouter.com/
[rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
[rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
[rr-docs]: https://reactrouter.com
[rr-feature-overview]: https://reactrouter.com/start/overview
[rr-tutorial]: https://reactrouter.com/start/tutorial
[remix-router-readme]: https://github.com/remix-run/react-router/blob/main/packages/router/README.md
8 changes: 4 additions & 4 deletions packages/router/utils.ts
Expand Up @@ -306,7 +306,7 @@ export function convertRoutesToDataRoutes(
/**
* Matches the given routes to a location and returns the match data.
*
* @see https://reactrouter.com/docs/en/main/utils/match-routes
* @see https://reactrouter.com/utils/match-routes
*/
export function matchRoutes<
RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject
Expand Down Expand Up @@ -528,7 +528,7 @@ function matchRouteBranch<
/**
* Returns a path with params interpolated.
*
* @see https://reactrouter.com/docs/en/main/utils/generate-path
* @see https://reactrouter.com/utils/generate-path
*/
export function generatePath<Path extends string>(
path: Path,
Expand Down Expand Up @@ -606,7 +606,7 @@ type Mutable<T> = {
* Performs pattern matching on a URL pathname and returns information about
* the match.
*
* @see https://reactrouter.com/docs/en/main/utils/match-path
* @see https://reactrouter.com/utils/match-path
*/
export function matchPath<
ParamKey extends ParamParseKey<Path>,
Expand Down Expand Up @@ -805,7 +805,7 @@ export function warning(cond: any, message: string): void {
/**
* Returns a resolved path object relative to the given pathname.
*
* @see https://reactrouter.com/docs/en/main/utils/resolve-path
* @see https://reactrouter.com/utils/resolve-path
*/
export function resolvePath(to: To, fromPathname = "/"): Path {
let {
Expand Down

0 comments on commit 37f2d36

Please sign in to comment.