@micro-router
    Preparing search index...

    Function useClientSideNavigation

    • A react hook that, given a path and its data, will return a reified href along with an onClick handler that can be used to initiate a client-side navigation.

      The returned onClick handler will check whether any modifier keys are active on the event (shift, meta, ctrl, alt). If so, it will allow the event to bubble. This preserves the ability for the user to intentionally open the link in a new tab or window.

      Type Parameters

      • P extends string | Path<string, any>

      Parameters

      • path: P
      • data: DataOf<P>

      Returns { href: string; onClick: (e: MouseEvent) => void }