Im using ace Editor in my react app and am getting the above error. I want to put the contents of the Ace Editor IDE that im using in my react app from a function call which is triggered through a submit button.
<AceEditor
ref='aceEditor'
height='100%'
width='100%'
mode={ideLanguage}
theme={ideTheme}
fontSize={ideFontSize}
showGutter={true}
showPrintMargin={false}/>
And this is the button
<Button
type='button'
buttonStyle='btn--primary--normal'
buttonSize='btn--medium'
onClick={SendCode}
>SUBMIT</Button>
And this is the function
const SendCode = () => {
console.log(this.refs.aceEditor.editor.getValue());
};
What am I doing wrong??