html_dependency_react {reactR} | R Documentation |
Dependencies for React
Description
Add JavaScript 'React' dependency. For this to work in RStudio Viewer, also include
html_dependency_corejs
.
Usage
html_dependency_react(offline = TRUE)
Arguments
offline |
|
Value
Examples
library(reactR)
library(htmltools)
tagList(
tags$script(
"
ReactDOM.render(
React.createElement(
'h1',
null,
'Powered by React'
),
document.body
)
"
),
#add core-js first to work in RStudio Viewer
html_dependency_corejs(),
html_dependency_react() #offline=FALSE for CDN
)
[Package reactR version 0.6.0 Index]