| redirectDocument | R Documentation |
https://reactrouter.com/api/utils/redirectDocument
redirectDocument(to)
to |
Character. Destination path or absolute URL. |
Returns a JS loader function that performs a document
redirect to to – a full page reload, as opposed to the client-side
navigation that redirect performs. Use when navigating to a
URL outside the router's control (e.g. a server-rendered page) so the
browser fully unloads the SPA.
For conditional document redirects inside a custom loader/action, call
window.jsmodule['@/reactRouter'].helpers.redirectDocument(to) from
your own JS() string.
A JS expression suitable for the loader
argument of Route.
## Not run:
Route(
path = "/docs",
loader = redirectDocument("/static/docs/index.html"),
element = NULL
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.