How to call React component's function from a global context (Coherent UI)
<p>I'm pretty new to React, and I'm trying to develop a UI for use in a game engine using Coherent UI. My UI is built with React, and I'm trying to get messages from Coherent UI into my React app.</p>

<p>Coherent UI provides the ability to send raw javascript script commands to the browser to execute, or to register events, but neither of these has worked for me.</p>

<p>I want Coherent UI to send a simple javascript command <code>toggleLoadingAnimation();</code> but I don't know how to create this javascript function in my React UI that will actually call a component's function or change its state.</p>

<p>Here's Coherent UI's info on sending Javascript commands: <a href="https://coherent-labs.com/Documentation/cpp/dc/dc7/_binding_cxx.html" rel="nofollow">https://coherent-labs.com/Documentation/cpp/dc/dc7/_binding_cxx.html</a></p>

<p>How can I format a command or properly register a callback function for a component to be called this way?</p>

<p>Is there any way to just tell a component to call one of its member functions?</p>