Function
Static Public Summary | ||
public |
createMemoryHistory(props: {}): * Creates a history object that stores locations in memory. |
|
public |
createRouteData(path: string, routeParams: object, routeData: object): {"path": *, "routeParams": *, "routeData": *} |
|
public |
matchPath(pathname: *, options: {}, parent: *): {"path": *, "url": *, "isExact": *, "params": *} Public API for matching a URL pathname to a path pattern. |
|
public |
matchRoutes(routes: Array<Route>, pathname: string, branch: Array): * |
Static Public
public createMemoryHistory(props: {}): * source
Creates a history object that stores locations in memory.
Params:
Name | Type | Attribute | Description |
props | {} |
|
Return:
* |
public createRouteData(path: string, routeParams: object, routeData: object): {"path": *, "routeParams": *, "routeData": *} source
import createRouteData from '@smartface/router/src/router/RouteData.js'
Return:
{"path": *, "routeParams": *, "routeData": *} |
public matchPath(pathname: *, options: {}, parent: *): {"path": *, "url": *, "isExact": *, "params": *} source
Public API for matching a URL pathname to a path pattern.
Params:
Name | Type | Attribute | Description |
pathname | * | ||
options | {} |
|
|
parent | * |
Return:
{"path": *, "url": *, "isExact": *, "params": *} |