UNPKG

react-nested-routes

Version:

React nested routes is a react component which helps you to create nested routes in react application. It also provides a hook to get active path and active index of the route.

12 lines (11 loc) 424 B
import React from "react"; interface NestedRouteProps { children: React.ReactNode; path: string; parent: string; } declare const NestedRoute: (props: NestedRouteProps) => string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined; export declare const useActivePath: ({ parent }: { parent: string; }) => string | undefined; export default NestedRoute;