A function that creates a route item manager.

  • Type Parameters

    Parameters

    • routes: I[]

      An array of switch items representing routes.

    • history: any

      The history object to be used for navigation.

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

    • A function that returns the current route item.