| replaceResponse | R Documentation |
https://reactrouter.com/api/utils/replace
replaceResponse(to)
to |
Character. Destination path. |
Returns a JS loader function that performs a replace
navigation to to – same as redirect, but the new
entry replaces the current one in the history stack instead of pushing
a new one. Use for "alias" routes where the original URL should not
remain in the user's back-history.
Renamed from replace() to avoid masking base::replace.
This mirrors the dataResponse() naming for the same reason.
For conditional replacements inside a custom loader/action, call
window.jsmodule['@/reactRouter'].helpers.replace(to) from your own
JS() string.
A JS expression suitable for the loader
argument of Route.
## Not run:
Route(path = "/legacy", loader = replaceResponse("/new"), element = NULL)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.