component: Create a React component

View source: R/reacttools.R

componentR Documentation

Create a React component

Description

Create a React component

Usage

component(name, varArgs = list())

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.

Value

An htmltools tag object

Examples

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

reactR documentation built on Sept. 30, 2024, 9:33 a.m.