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 @@
basics.Rmd