Learn R Programming

shiny.react (version 0.4.0)

reactElement: Create a 'React' element

Description

Creates a shiny.tag which can be rendered just like other 'Shiny' tags as well as passed in props to other 'React' elements. Typically returned from a wrapper ("component") function, which parses its arguments with asProps() and fills in the other arguments.

Usage

reactElement(module, name, props, deps = NULL)

Value

A shiny.tag object representing the 'React' element.

Arguments

module

JavaScript module to import the component from.

name

Name of the component.

props

Props to pass to the component.

deps

HTML dependencies to attach.

See Also

asProps

Examples

Run this code
Component <- function(...) reactElement(
  module = "@/module", name = "Component", props = asProps(...)
)

Run the code above in your browser using DataLab