diff --git a/R/components.R b/R/components.R index 5a1980b..e44ff0f 100644 --- a/R/components.R +++ b/R/components.R @@ -75,13 +75,13 @@ Route <- function(..., element, key = uuid::UUIDgenerate()) { #' Link #' #' The `reloadDocument` can be used to skip client side routing and let the -#' browser handle the transition normally (as if it were an ). In -#' React Router v6 `reloadDocument` if `FALSE`, but given shiny behavior, the -#' `Link()` function makes it `TRUE` by default. +#' browser handle the transition normally (as if it were an ). Given +#' shiny behavior, using `reloadDocument = TRUE` allows to render correctly +#' objects created in the server side. #' #' @rdname Link #' @param ... Props to pass to element. -#' @param reloadDocument Boolean. Default TRUE. Let browser handle the transition normally +#' @param reloadDocument Boolean. Default FALSE. #' @return A Link component. #' @export Link <- function(..., reloadDocument = TRUE) { @@ -107,13 +107,13 @@ Navigate <- component('Navigate') #' NavLink #' #' The `reloadDocument` can be used to skip client side routing and let the -#' browser handle the transition normally (as if it were an ). In -#' React Router v6 `reloadDocument` if `FALSE`, but given shiny behavior, the -#' `NavLink()` function makes it `TRUE` by default. +#' browser handle the transition normally (as if it were an ). Given +#' shiny behavior, using `reloadDocument = TRUE` allows to render correctly +#' objects created in the server side. #' #' @rdname NavLink #' @param ... Props to pass to element. -#' @param reloadDocument Boolean. Default TRUE. Let browser handle the transition normally +#' @param reloadDocument Boolean. Default FALSE. #' @return A NavLink component. #' @export NavLink <- function(..., reloadDocument = TRUE) { diff --git a/inst/examples/dynamic-segment/app.R b/inst/examples/dynamic-segment/app.R index 178e103..5b72ae8 100644 --- a/inst/examples/dynamic-segment/app.R +++ b/inst/examples/dynamic-segment/app.R @@ -90,12 +90,14 @@ ui <- reactRouter::HashRouter( nav_item( NavLink( to = "overview", + reloadDocument = TRUE, "Overview" ) ), nav_item( NavLink( to = "analysis", + reloadDocument = TRUE, "Analysis" ) ), @@ -103,6 +105,7 @@ ui <- reactRouter::HashRouter( nav_item( NavLink( to = "/", + reloadDocument = TRUE, shiny::icon("home") ) ), diff --git a/man/Link.Rd b/man/Link.Rd index 0b2513c..0ce089f 100644 --- a/man/Link.Rd +++ b/man/Link.Rd @@ -30,9 +30,9 @@ A Link component. } \description{ The `reloadDocument` can be used to skip client side routing and let the -browser handle the transition normally (as if it were an ). In -React Router v6 `reloadDocument` if `FALSE`, but given shiny behavior, the -`Link()` function makes it `TRUE` by default. +browser handle the transition normally (as if it were an ). Given +shiny behavior, using `reloadDocument = TRUE` allows to render correctly +objects created in the server side. \url{https://reactrouter.com/6.30.0/components/link} } diff --git a/man/NavLink.Rd b/man/NavLink.Rd index 96cee6c..f116bc3 100644 --- a/man/NavLink.Rd +++ b/man/NavLink.Rd @@ -30,9 +30,9 @@ A NavLink component. } \description{ The `reloadDocument` can be used to skip client side routing and let the -browser handle the transition normally (as if it were an ). In -React Router v6 `reloadDocument` if `FALSE`, but given shiny behavior, the -`NavLink()` function makes it `TRUE` by default. +browser handle the transition normally (as if it were an ). Given +shiny behavior, using `reloadDocument = TRUE` allows to render correctly +objects created in the server side. \url{https://reactrouter.com/6.30.0/components/nav-link} }