apply_react: Apply React

View source: R/react.R

apply_reactR Documentation

Apply React

Description

Apply React to a project, adds the relevant (babel) loader, installs dependencies, and creates, updates, or replaces the srcjs/index.js file.

Usage

apply_react(use_cdn = TRUE)

Arguments

use_cdn

Whether to use the CDN for react and react-dom (recommended). This means later importing the dependencies in the shiny UI using reactCDN(), this function will be created in a R/react_cdn.R. The correct instructions to do so are printed to the console by the function.

Details

After running this function and bundling the JavaScript remember to place the code printed by the function in shiny UI. By default apply_react() does not bundle react and react-dom and thus requires using reactCDN() to import the dependencies in the shiny application: this function is created in a R/react_cdn.R.


packer documentation built on May 28, 2022, 5:06 p.m.