newprint newprint - 9 months ago 53
React JSX Question

How to get the value of react component - AceEditor

I am facing the following issue while using

react component

I am using
as user input, after user enters code, he(she) presses the
button. (see the picture) How do I extract the text that users enters from
component ? enter image description here


You need to subscribe to the onChange event (explained in the docs) and store the value passed into the callback somewhere, perhaps in the component's state if the Run button is on the same page. Then, when user clicks the button just retrieve it via