T8 React Router
Link props
In addition to the props inherited from regular HTML links:
⬥ data-history="replace" prevents the user from returning to the current URL by pressing the browser's Back button after clicking a link with this prop.
⬥ data-spa="off" turns off SPA navigation and triggers a full-page reload.
⬥ data-scroll="off" turns off the default scrolling to the element matching the URL fragment or to the top of the page when the link is clicked.
⬥ data-id="..." is available as options.id in routing middleware, so it can be used as a way to distinguish certain links requiring special handling inside the middleware (unlike id, data-id doesn't have to be strictly unique).
Navigation options
The imperative navigation APIs like route.navigate(options), useRouteState(url, options?) and routing middleware make use of the navigation options similar to the link props outlined above, with the data- prefix stripped from their names: { history, spa, scroll, id }. On top of these, the navigation options can include href and referrer, the navigation destination and initial URLs, as well as target, equivalent to the HTML link target attribute.
← Navigation | Middleware →