A React Router instance for navigation in flows.
Router comes from @remix-run/router.
ctx.router provides navigation capabilities in RunJS. Use ctx.router.navigate() to navigate to a path, replace history, or pass state.
Navigate to a target path.
Signature:
Parameters:
to: target path (string), relative history position (number, e.g. -1 for back), or null (refresh current page)options: optional config
replace?: boolean: replace current history entry (default false, i.e. push)state?: any: state passed to target route, not shown in URL; accessible via ctx.location.stateExamples:
navigate() pushes a new history entry by defaultreplace: true replaces the current entry without adding a new one (useful for redirects)state:
state is not in the URL and suits sensitive or temporary infoctx.location.state