How can i react R codes for reactJS?

Hello friends
I want to publish wordcloud graph to reactJS. How can i react R codes from nodeJS?
Is it possible to use R output for other web applications?
Thanks a lot

Check out the reactR package and vignettes:

There's the reactR package, but it does not give you access to lifecycle methods (if I remember correctly from a blog post).

I built an example application a few weeks ago as a proof of concept using node and react. I wanted to see if it was possible to R to process data and use it in a react application. The client is built using the create-react-app and the server runs on node.js and express.js. There's a wonderful little npm package called r script for running R code in node. The demo application is fairly basic as I wanted to see if it is possible and if it makes sense to use. It's likely a good option for more complex analysis and easier than writing js code. I haven't tested the application with visualizations, but it might be better to use a javascript library (i.e., D3) to render the visualizations using state objects.

Here's the link to the example application: https://github.com/davidruvolo51/r-react-demo

Let me know if you have any questions.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

I believe so. See the vignette below:
https://react-r.github.io/reactR/articles/intro_htmlwidgets.html

thanks but, i want to react r codes from ReactJS. I'm writing UI in reactJS not in R environment. Still, this package is proper to do that, right?
Or,
Does plumber package work for this?

I need really simple thing. I want to use R wordcloud graph and pre-datamanipulation's codes in node.js, react.js. I saw plumber package. It creates api. maybe, it is also proper to do that js can get graph by reacting R calculations via API

The plumber package could be an option, but I haven't used it before so I'm not sure how it would work with a node application.

Express.js is a web application framework for creating api's in node. This would establish a flow of data between the client (your react application) and the server (node environment). (In other words: on server side, the data is received from the client (if applicable; or loaded from a file on the server) and then processed in R. The output is sent back to the server and then back to the client.). R code can be written as normal (in a .R file) and the output that is sent back to the client is the word cloud. I haven't tested this method using html outputs (assuming that the word cloud output is an html object), but it likely this would address the issue.