react has become incredibly popular, and the ecosystem around
react is robust.
reactR aims to allow
R users to more easily incorporate
install.packages("reactR") # for the latest development version # install from Github # devtools::install_github("timelyportfolio/reactR")
react to render a simple
h1 HTML element below.
library(reactR) library(htmltools) attachDependencies( tags$script( " ReactDOM.render( React.createElement( 'h1', null, 'Powered by React' ), document.getElementById('react-heading-here') ) " ), html_dependency_react() )
JSX helps ease some of the burden caused by
reactR provides a
babel_transform() function to use
JSX. Hopefully, in the future, we can convince RStudio to modify
htmltools to work directly with
JSX (see issue).
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.