Description Usage Arguments Value Note Examples
Given a JSX string, this function prints the code of the
corresponding React component that can be used in
chakraComponent
.
1 | jsxString2code(jsxString, clipboard = TRUE)
|
jsxString |
JSX code given as a string |
clipboard |
whether to copy the output to the clipboard |
No return value, only prints the code in the console and copy it
to the clipboard if clipboard = TRUE
.
Instead of using this function, rather use the RStudio addin provided by the package. Simply copy some JSX code to your clipboard, and select the 'JSX parser' addin in the RStudio Addins menu.
1 2 3 4 | jsxString <- '<Input type="email" id="myinput" />'
jsxString2code(jsxString)
jsxString <- '<Button onClick={() => alert("hello")}>Hello</Button>'
jsxString2code(jsxString)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.