Type: Package
Title: 'React Router' for 'shiny' Apps and 'Quarto'
Version: 0.1.0
Maintainer: Felix Luginbuhl <felix.luginbuhl@protonmail.ch>
Description: You can easily share url pages using 'React Router' in 'shiny' applications and 'Quarto' documents. The package wraps the 'react-router-dom' 'React' library and provides access to hash routing to navigate on multiple url pages.
License: MIT + file LICENSE
Encoding: UTF-8
Depends: R (≥ 3.4)
Imports: htmltools, shiny, shiny.react, checkmate
Suggests: testthat (≥ 3.0.0), chromote (≥ 0.1.1.9001), shinytest2, knitr, rmarkdown
RoxygenNote: 7.3.2
URL: https://felixluginbuhl.com/reactRouter/
BugReports: https://github.com/lgnbhl/reactRouter/issues
Config/testthat/edition: 3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-04-28 19:31:39 UTC; felix
Author: Felix Luginbuhl ORCID iD [aut, cre], Shopify Inc. [ctb, cph] (Shopify Inc. template <https://reactrouter.com/>)
Repository: CRAN
Date/Publication: 2025-04-29 09:10:08 UTC

HashRouter

Description

https://reactrouter.com/6.30.0/router-components/hash-router

Usage

HashRouter(...)

Arguments

...

Props to pass to element.

Value

A HashRouter component.


Description

https://reactrouter.com/6.30.0/components/link

https://reactrouter.com/en/main/components/link

Usage

Link(...)

Link.shinyInput(inputId, ...)

updateLink.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to element.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Value

A Link component.


MemoryRouter

Description

https://reactrouter.com/6.30.0/router-components/memory-router

Usage

MemoryRouter(...)

Arguments

...

Props to pass to element.

Value

A MemoryRouter component.


Description

https://reactrouter.com/6.30.0/components/nav-link

https://reactrouter.com/en/main/components/nav-link

Usage

NavLink(...)

NavLink.shinyInput(inputId, ...)

updateNavLink.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to element.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Value

A NavLink component.


Description

https://reactrouter.com/6.30.0/components/navigate

Usage

Navigate(...)

Arguments

...

Props to pass to element.

Value

A Navigate component.


Outlet

Description

https://reactrouter.com/6.30.0/components/outlet

Usage

Outlet(...)

Arguments

...

Props to pass to element.

Value

A Outlet component.


Route

Description

https://reactrouter.com/6.30.0/components/route

Usage

Route(...)

Arguments

...

Props to pass to element.

Value

A Route component.


Routes

Description

https://reactrouter.com/6.30.0/components/routes

Usage

Routes(...)

Arguments

...

Props to pass to element.

Value

A Routes component.


Documentation template for components

Description

Documentation template for components

Arguments

...

Props to pass to the component. The allowed props are listed below in the Details section.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.


react-router-dom JS dependency

Description

react-router-dom JS dependency

Usage

reactRouterDependency()

Value

HTML dependency object.


Objects exported from other packages

Description

These objects are imported from other packages. Follow the links below to see their documentation.

shiny.react

JS