mercredi 20 juillet 2016

How Can I Communicate With A React Component From Outside React?

I need to integrate a React component into an existing webpage. Currently there are callbacks handling clicks on various page elements. When any of these items are clicked, I need to pass an id (depending on which bit of UI was clicked) into the React Component and have it react (I just need to set a property on its state).

I can't alter the callbacks other than to pass the data on to the React component. I can't edit the rest of the page UI.

How can I pass data into the React component from outside?

Aucun commentaire:

Enregistrer un commentaire