1

I built a small react application using the create-react-app build configuration. The idea is that this app will be used like a widget which takes one parameter, an id of an element that will be used as a container for the app, so it can be embedded into any html page. Has anyone successfully done this? thanks,

this is similar to this this question

2 Answers2

0

Should be possible. You would just have to figure out a way to initiate react to render within the parent application. You could do this by building your React, then in the parent application point to it so it gets loaded when you wanted it to.

You would also need a way to pass the data from the parent application to the react application more than likely using client side storage of some sort. (sessionStorage, localStorage, window, etc.)

krantni
  • 1
  • 1
0

You could have a config javascript object on the page where you load the react app.

window.config = {

"name":"dani";

}

Then inside the app read window.config and get your values.

You could also use LocalStorage.