react_component: React components

View source: R/react.R

react_componentR Documentation

React components

Description

Declare the React components defined in your app.

Usage

react_component(name)

Arguments

name

The name of the component.

Details

There are three steps to add a React component to your Rhino application:

  1. Define the component using JSX and register it with Rhino.registerReactComponents().

  2. Declare the component in R with rhino::react_component().

  3. Use the component in your application.

Please refer to the Tutorial: Use React in Rhino to learn about the details.

Value

A function representing the component.

Examples

# Declare the component.
TextBox <- react_component("TextBox")

# Use the component.
ui <- TextBox("Hello!", font_size = 20)

Appsilon/rhino documentation built on Sept. 27, 2024, 7:01 p.m.