import * as React from "react"; import { observer } from "mobx-react"; import { observable, action } from "mobx"; export interface ScriptBoxProps { onSave: (text: string, onError: (error: string) => void) => void; onCancel?: () => void; } @observer export class ScriptBox extends React.Component { @observable private _scriptText: string = ""; @action onChange = (e: React.ChangeEvent) => { this._scriptText = e.target.value; } @action onError = (error: string) => { console.log(error); } render() { return (
); } }