Function createRouteItemManager

A function that creates a route item manager.

  • Type Parameters

    • T extends Record<string, any> = Record<string, any>
    • I extends ISwitchItem = ISwitchItem

    Parameters

    • routes: I[]

      An array of switch items representing routes.

    • history: MemoryHistory | BrowserHistory | HashHistory

      The history object to be used for navigation.

    Returns {
        clear: void;
        (): null | I;
    }

    • A function that returns the current route item.
      • (): null | I
      • Returns null | I

    • clear: void