Simplr Router logo Simplr Router Docs Guides Toggle darkmode

API: Helper functions

Helper functions are callable functions that plug into the currently active Simplr Router instance without the developer having to hold onto a reference of the router.

Helper functions are exported from the same package as the router itself.

import { getBreadcrumbs } from "@simplr-wc/router";
NameTypeDescription
changeView()Function(changeViewObject: ChangeViewObject): voidChange view programmatically.
getBreadcrumbs()Function(): SimplrRouterBreadcrumb[]Returns the breadcrumbs for the current route.
getCurrentView()Function(): SimplrRouterNavigationDataReturns the current view.