ra-core
Version:
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
16 lines • 477 B
TypeScript
import type { RouterMatch } from "./RouterProvider.js";
/**
* Hook to match the current location against a pattern.
* This is a router-agnostic wrapper that uses the configured router provider.
*
* @example
* const match = useMatch({ path: '/posts/:id', end: true });
* if (match) {
* console.log(match.params.id);
* }
*/
export declare const useMatch: (pattern: {
path: string;
end?: boolean;
}) => RouterMatch | null;
//# sourceMappingURL=useMatch.d.ts.map