react_component | R Documentation |
Declare the React components defined in your app.
react_component(name)
name |
The name of the component. |
There are three steps to add a React component to your Rhino application:
Define the component using JSX and register it with Rhino.registerReactComponents()
.
Declare the component in R with rhino::react_component()
.
Use the component in your application.
Please refer to the Tutorial: Use React in Rhino to learn about the details.
A function representing the component.
# Declare the component.
TextBox <- react_component("TextBox")
# Use the component.
ui <- TextBox("Hello!", font_size = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.