{"id":13426243,"url":"https://github.com/react-R/reactR","last_synced_at":"2025-03-15T21:30:50.244Z","repository":{"id":38708633,"uuid":"61899001","full_name":"react-R/reactR","owner":"react-R","description":"React for R","archived":false,"fork":false,"pushed_at":"2024-09-24T04:43:50.000Z","size":2293,"stargazers_count":414,"open_issues_count":15,"forks_count":35,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-10T05:37:49.293Z","etag":null,"topics":["cran","html","htmlwidgets","javascript","package","r","react","reactjs","rstats","web"],"latest_commit_sha":null,"homepage":"https://react-R.github.io/reactR","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-R.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-24T16:52:00.000Z","updated_at":"2025-02-13T22:39:57.000Z","dependencies_parsed_at":"2023-12-02T16:27:38.436Z","dependency_job_id":"628fbaf4-2161-4742-8649-4b24537adac7","html_url":"https://github.com/react-R/reactR","commit_stats":{"total_commits":299,"total_committers":8,"mean_commits":37.375,"dds":"0.49498327759197325","last_synced_commit":"fb3ba30749e83faf4433f62c0ea1dd558c81b64e"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2FreactR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2FreactR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2FreactR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2FreactR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-R","download_url":"https://codeload.github.com/react-R/reactR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792294,"owners_count":20348611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cran","html","htmlwidgets","javascript","package","r","react","reactjs","rstats","web"],"created_at":"2024-07-31T00:01:29.858Z","updated_at":"2025-03-15T21:30:49.557Z","avatar_url":"https://github.com/react-R.png","language":"JavaScript","readme":"---\noutput: github_document\n---\n\n# reactR \u003cimg src=\"vignettes/logo.svg\" alt=\"reactR logo\" width=\"100px\" /\u003e\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/reactR)](https://cran.r-project.org/package=reactR)\n[![R-CMD-check](https://github.com/react-R/reactR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/react-R/reactR/actions/workflows/R-CMD-check.yaml)\n\n`reactR` provides a set of convenience functions for using [`React`](https://reactjs.org/) in `R` with `htmlwidget` constructor templates and local JavaScript dependencies.  The `React` ecosystem is rich with components that can enhance `R` web and Shiny apps.  `scaffoldReactWidget()` helps build `htmlwidgets` to integrate these `React` components as `R` `htmlwidgets`.  `scaffoldReactShinyInput()` does the same for `Shiny` inputs.  The local dependency functions are modeled after the `html_dependency_*` functions from RStudio's [`rmarkdown`](https://github.com/rstudio/rmarkdown) package.\n\n## Installation\n\nYou can install reactR from CRAN with `install.packages(\"reactR\")`.  For the development version, please use `devtools` as shown below.\n\n```R\n# install.packages(\"devtools\")\ndevtools::install_github(\"react-R/reactR\")\n```\n\n## Creating htmlwidgets with React Components\n\nTo wrap a `React` component as an `htmlwidget`, please see the tutorial [htmlwidgets with reactR](https://react-r.github.io/reactR/articles/intro_htmlwidgets.html).  Also, there are a variety of examples in the [react-R Github organization](https://github.com/react-R).\n\n\n[`reactable`](https://github.com/glin/reactable) is a very well-built `htmlwidget` leveraging this functionality.\n\n## Shiny Outputs and Inputs\n\n`htmlwidgets` built with `reactR` work well in Shiny as outputs.  In version `0.4.0` Alan Dipert has added the ability to easily create React-based official `Shiny` inputs with helpers and scaffolds.  Please see the [tutorial](https://react-r.github.io/reactR/articles/intro_inputs.html) for more details.\n\n## Examples\n\nBelow are examples of using `reactR` directly.\n\n```R\nlibrary(reactR)\nlibrary(htmltools)\n\nbrowsable(tagList(\n  tags$div(id = \"app\"),\n  tags$script(\n  \"\n    ReactDOM.render(\n      React.createElement(\n        'h1',\n        null,\n        'Powered by React'\n      ),\n      document.getElementById('app')\n    )\n  \"\n  ),\n  #add core-js first to work in RStudio Viewer\n  html_dependency_corejs(),\n  html_dependency_react()\n))\n```\n\n`reactR` uses the `V8` package if available to transform `JSX` and `ES2015` code with `babel`.\n\n```R\nlibrary(reactR)\nlibrary(htmltools)\n\nbrowsable(\n  tagList(\n    tags$div(id = \"app\"),\n    tags$script(\n      babel_transform('ReactDOM.render(\u003ch1\u003ePowered By React/JSX\u003c/h1\u003e,document.getElementById(\"app\"))')\n    ),\n    # add core-js shim first for React in older versions of RStudio Viewer\n    #html_dependency_corejs(),\n    html_dependency_react()\n  )\n)\n```\n\n## Contributing and Code of Conduct\n\nWe welcome contributors and would love your participation.  Please note that this project is released with a [Contributor Code of Conduct](https://github.com/react-R/reactR/blob/master/CONDUCT.md). By participating in this project you agree to abide by the terms.\n","funding_links":[],"categories":["JavaScript","UI Components"],"sub_categories":["React"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-R%2FreactR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-R%2FreactR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-R%2FreactR/lists"}