reactR (version 0.5.0)

component: Create a React component

Description

Create a React component

Usage

component(name, varArgs = list())

Value

An htmltools tag object

Arguments

name

Name of the React component, which must start with an upper-case character.

varArgs

Attributes and children of the element to pass along to tag as varArgs.

Examples

Run this code
component("ParentComponent",
  list(
    x = 1,
    y = 2,
    component("ChildComponent"),
    component("OtherChildComponent")
  )
)

Run the code above in your browser using DataLab