Learn R Programming

reactRouter

The goal of reactRouter is to provide a wrapper around React Router (v6).

Usage

You can easily add URL pages in Quarto document or R shiny like so:

library(reactRouter)

HashRouter(
  NavLink(to = "/", "Main"),
  NavLink(to = "/analysis", "Analysis"),
  Routes(
    Route(path = "/", element = "Main content"),
    Route(path = "/analysis", element = "Analysis content")
  )
)

Install

#remotes::install_github("lgnbhl/reactRouter") # development version

install.packages("reactRouter")

Example

Get started with a showcase example:

# print all examples available: reactRouterExample()
reactRouterExample("basic")

Read the vignette here for detailed use cases with Quarto and R Shiny.

Contribute

Would you like to contribute to the package? Have a look at the current roadmap.

Copy Link

Version

Install

install.packages('reactRouter')

Monthly Downloads

236

Version

0.1.1

License

MIT + file LICENSE

Maintainer

F<c3><a9>lix Luginbuhl

Last Published

July 23rd, 2025

Functions in reactRouter (0.1.1)

Link

Link
NavLink

NavLink
Navigate

Navigate
Routes

Routes
Outlet

Outlet
BrowserRouter

BrowserRouter
MemoryRouter

MemoryRouter
component

Documentation template for components
Route

Route
HashRouter

HashRouter
reactRouterDependency

react-router-dom JS dependency
reactRouterExample

Run reactRouterExample example
reexports

Objects exported from other packages