reactElement {shiny.react}R Documentation

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)

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.

Value

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

See Also

asProps

Examples

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


[Package shiny.react version 0.4.0 Index]