@@ -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 */
5050export 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 */
8383export 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 */
9797export 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 */
114114export 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 */
125125export 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 */
157157export 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 */
230230export 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 */
240240export 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 */
256256export 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 */
271271export 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 */
302302export function useRoutes (
303303 routes : RouteObject [ ] ,
@@ -650,7 +650,7 @@ enum DataRouterStateHook {
650650function 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
656656function useDataRouterContext ( hookName : DataRouterHook ) {
0 commit comments