Closed andyquinterom closed 1 year ago
Closes #45
These changes allow components that are not inputs or outputs to be rendered in Rmarkdown.
The following example works in a shiny runtime:
library(shiny.react) library(shiny) library(shiny.fluent) ui <- fluentPage( ActionButton.shinyInput("nice", PrimaryButton("Nice!")) ) server <- function(input, output, session) { observe({ print(input$nice) }) } shinyApp(ui, server)
The following works with Rmarkdown:
--- title: "shiny-rmarkdown" output: html_document --- ```{r, include=FALSE} library(shiny.fluent)
# This should work! PrimaryButton("Nice!")
# This should not :( ActionButton.shinyInput("nice", PrimaryButton("Nice!"))
The following is rendered from the Rmarkdown document. ![image](https://github.com/Appsilon/shiny.react/assets/51521150/6b3b5d02-3334-4037-a85c-e6d471f4d682)
Changes
Closes #45
How to test
These changes allow components that are not inputs or outputs to be rendered in Rmarkdown.
The following example works in a shiny runtime:
The following works with Rmarkdown: