MCPcopy Index your code
hub / github.com/reactide/reactide / componentDidUpdate

Method componentDidUpdate

renderer/components/TextEditor.js:179–202  ·  view source on GitHub ↗
(prevProps)

Source from the content-addressed store, hash-verified

177 }
178
179 componentDidUpdate(prevProps) {
180 const { path/*, ...rest*/ } = this.props;
181
182 //this._editor.updateOptions(rest); * TODO - Ryan
183
184 if (path !== prevProps.path) {
185 this.editorStates.set(prevProps.path, this.editor.saveViewState());
186 this._openFile(path);
187 }
188 else {
189 const model = this.editor.getModel();
190 if (value !== model.getValue()) {
191 model.pushEditOperations(
192 [],
193 [
194 {
195 range: model.getFullModelRange(),
196 text: value,
197 }
198 ]
199 );
200 }
201 }
202 }
203
204 componentWillUnmount() {
205 // dispose to prevent memory leaks

Callers

nothing calls this directly

Calls 1

_openFileMethod · 0.95

Tested by

no test coverage detected