The goal of react
is to help with reactivity, instead of calling the foo
reactive expression foo()
you can call react$foo
similar to how one calls input$bar
for inputs, or alternatively react[foo]
or react[foo()]
.
The benefit is that it makes it easier to spot calls to reactive expressions in your server code.
InstallationYou can install the development version of react from GitHub with:
ExamplesTake this from the shiny example:
With react
you can rewrite the plot
output as one of these, depending on your taste.
# react$ is similar conceptually to how input$ works
output$plot <- renderPlot({
chartSeries(react$dataInput, theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
# react[]
output$plot <- renderPlot({
chartSeries(react[dataInput], theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
# react[()] so that you still have the calling a function feel
# and you just sourround it
output$plot <- renderPlot({
chartSeries(react[dataInput()], theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4