Packages

React inside Phoenix LiveView — async code splitting, client-side props diffing, and zero-config component discovery.

Retired package: Release invalid - Not production-ready, LiveView 1.0.x compatibility issue

Current section

Files

Jump to
react_phx assets dist link.d.ts
Raw

assets/dist/link.d.ts

import { type AnchorHTMLAttributes, type ReactNode } from "react";
export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
/** Traditional browser navigation (full page reload). */
href?: string | null;
/** Patches the current LiveView (calls handle_params). */
patch?: string | null;
/** Navigates to a different LiveView within the same live_session. */
navigate?: string | null;
/** Whether to replace or push browser history. */
replace?: boolean;
children?: ReactNode;
}
/**
* Phoenix LiveView Link component for React.
*
* Handles different types of navigation in Phoenix LiveView:
* - href: Traditional browser navigation (full page reload)
* - patch: Patches the current LiveView (calls handle_params)
* - navigate: Navigates to a different LiveView within the same live_session
* - replace: Whether to replace or push browser history
*/
export declare function Link({ href, patch, navigate, replace, children, ...attrs }: LinkProps): React.JSX.Element;