// Setup or restore monaco model for the opening file path _openFile(path) { let model = this._initializeFile(path); // Restore the editor state for the file const editorState = this.editorStates.get(path); if (editorState) { this.editor.restoreViewState(editorState); } // Bring browser focus to the editor text this.editor.focus(); // Subscribe to change in value so we can notify the parent this._subscription = model.onDidChangeContent(() => { const value = model.getValue(); this.props.onValueChange(value); this._lintCode(value); }); }