change_page {shiny.router}R Documentation

Change the currently displayed page.

Description

Works by sending a message up to our reactive input binding on the client side, which tells page.js to update the window URL accordingly, then tells client side shiny that our reactive input binding has changed, then that comes back down to our router callback function and all other observers watching get_page() or similar.

Usage

change_page(page, session = shiny::getDefaultReactiveDomain(), mode = "push")

Arguments

page

The new URL to go to. Should just be the path component of the URL, with optional query, e.g. "/learner?id=%d"

session

The current Shiny session.

mode

("replace" or "push") whether to replace current history or push a new one. More in shiny::updateQueryString.


[Package shiny.router version 0.3.1 Index]