Learn R Programming

shiny.react

Use React in Shiny applications.

This R package enables using React in Shiny apps and is used e.g. by the shiny.fluent package. It contains R and JS code which is independent from the React library (e.g. Fluent UI) that is being wrapped.

Installation

Stable version:

install.packages("shiny.react")

Development version:

remotes::install_github("Appsilon/shiny.react")

Development

To build and install the package, run:

(cd js && yarn && yarn webpack)
Rscript -e 'devtools::document(); devtools::install()'

Testing

  • cd js && yarn lint lints the JS code
  • cd js && yarn test runs the unit tests for the JS code
  • Rscript -e "lintr::lint_package()" runs linter for the R code
  • Rscript -e "devtools::test()" runs unit tests for the R code

How to contribute?

If you want to contribute to this project please submit a regular PR, once you're done with a new feature or bug fix.

Reporting a bug is also helpful - please use GitHub issues and describe your problem as detailed as possible.

Appsilon

Appsilon is a Posit (formerly RStudio) Full Service Certified Partner. Learn more at appsilon.com.

Get in touch opensource@appsilon.com

Explore the Rhinoverse - a family of R packages built around Rhino!

Copy Link

Version

Install

install.packages('shiny.react')

Monthly Downloads

2,514

Version

0.4.0

License

LGPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Jakub Sobolewski

Last Published

May 20th, 2024

Functions in shiny.react (0.4.0)

asProps

Parse arguments as props
setInput

Set input
enableReactDebugMode

Enable 'React' debug mode
reactOutput

'React' output
reactElement

Create a 'React' element
ReactContext

React context
reactDependency

'React' library dependency
renderReact

Render 'React'
triggerEvent

Trigger event
updateReactInput

Update 'React' input
JS

Mark character strings as literal JavaScript code
shinyReactDependency

'shiny.react' JavaScript dependency