diff --git a/src/Link.tsx b/src/Link.tsx index 30ae2e9..66459e9 100644 --- a/src/Link.tsx +++ b/src/Link.tsx @@ -1,9 +1,9 @@ import React, { useCallback, forwardRef, Ref } from 'react' -import { navigate } from './navigate' +import { navigate, NavigateOptions } from './navigate' import { useBasePath, useFullPath } from './location' -export interface LinkProps extends React.AnchorHTMLAttributes { +export interface LinkProps extends React.AnchorHTMLAttributes, NavigateOptions { href: string basePath?: string children?: React.ReactNode @@ -15,7 +15,10 @@ export interface ActiveLinkProps extends LinkProps { exactActiveClass?: string } -function Link({ href, basePath, ...props }: LinkProps, ref?: Ref) { +function Link( + { href, basePath, replace, query, state, ...props }: LinkProps, + ref?: Ref, +) { basePath = useLinkBasePath(basePath) href = getLinkHref(href, basePath) @@ -31,7 +34,7 @@ function Link({ href, basePath, ...props }: LinkProps, ref?: Ref