React Router API Reference
    Preparing search index...

    Function createRoutesFromChildren

    • Creates a route config from a React "children" object, which is usually either a <Route> element or an array of them. Used internally by <Routes> to create a route config from its children.

      Parameters

      • children: ReactNode

        The React children to convert into a route config

      • parentPath: number[] = []

        The path of the parent route, used to generate unique IDs.

      Returns RouteObject[]

      An array of RouteObjects that can be used with a DataRouter

      data