Function createRouteParamsManager

Creates a route parameters manager.

  • Type Parameters

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

      The type of the route parameters object.

    • I extends ISwitchItem = ISwitchItem

      The type of the switch item object.

    Parameters

    • routes: I[]

      The list of routes.

    • history: MemoryHistory | BrowserHistory | HashHistory

      The history object.

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

    • The function that returns the current route parameters object.
      • (): null | T
      • Returns null | T

    • clear: void