diff --git a/README.md b/README.md index 2f5ef09..bdfb7e1 100644 --- a/README.md +++ b/README.md @@ -64,21 +64,27 @@ Example Visit [examples](https://github.com/Appsilon/shiny.router/tree/master/examples) directory for some complete samples. Here's the basic usage: ```r - router <- make_router( - route("/", root_page), - route("/other", other_page) - ) +library(shiny) +library(shiny.router) - ui <- fluidPage( - title = "Router demo", - router$ui - ) +root_page <- div(h2("Root page")) +other_page <- div(h3("Other page")) + +router <- make_router( + route("/", root_page), + route("other", other_page) +) + +ui <- fluidPage( + title = "Router demo", + router$ui +) - server <- function(input, output, session) { - router$server(input, output, session) - } +server <- function(input, output, session) { + router$server(input, output, session) +} - shinyApp(ui, server) +shinyApp(ui, server) ``` How to contribute? diff --git a/docs/articles/basics.html b/docs/articles/basics.html index 0532ea5..19e933d 100644 --- a/docs/articles/basics.html +++ b/docs/articles/basics.html @@ -88,7 +88,7 @@

Introduction to the routing in Shiny with shiny.router

Appsilon

-

2020-11-03

+

2020-11-18

diff --git a/docs/index.html b/docs/index.html index 32feb7c..7ba26e0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,9 +12,9 @@ - +