@@ -2,31 +2,6 @@ isUpper <- function(s) {
22 grepl(" ^[[:upper:]]+$" , s )
33}
44
5- # ' React component builder functions
6- # '
7- # ' Functions for creating React component, HTML, and SVG trees to send to the
8- # ' browser for rendering.
9- # '
10- # ' The \code{\link{component}} function creates a representation of a React
11- # ' component instance to send to the browser for rendering. It is analagous to
12- # ' \code{\link[htmltools]{tag}}.
13- # '
14- # ' The \code{\link{React}} list is a special object that supports
15- # ' \link[=InternalMethods]{extraction} syntax for creating React components.
16- # '
17- # ' Once a component or tag has been created in R, it must be passed to
18- # ' \code\{\link{reactData}} before being sent to the browser. In the case of
19- # ' htmlwidgets, the return value of \code{reactData} should be passed as the
20- # ' \code{x} argument of \code{\link{htmlwidgets::createWidget}}.
21- # '
22- # ' Any React components named by \code{component} or \code{React} must have been
23- # ' installed on the client using \code{reactR.reactWidget}. Alternatively, the
24- # ' JSON representing the tag can be converted to a React component tree with
25- # ' \code{reactR.hydrate}.
26- # '
27- # ' @name builder
28- NULL
29-
305# ' Create a React component
316# '
327# ' @param name Name of the React component, which must start with an upper-case
@@ -98,8 +73,8 @@ React <- structure(
9873# ' @export
9974`[[<-.react_component_builder` <- `$<-.react_component_builder`
10075
101- # ' Prepare data that represents a character vector, a React component, or an
102- # ' htmltools tag for sending to the client.
76+ # ' Prepare data that represents a single-element character vector, a React
77+ # ' component, or an htmltools tag for sending to the client.
10378# '
10479# ' @param tag character vector or React component or
10580# ' \code{\link[htmltools]{tag}}
0 commit comments