diff --git a/_js/live_editor.js b/_js/live_editor.js index 5f582b40..e6095cbd 100644 --- a/_js/live_editor.js +++ b/_js/live_editor.js @@ -115,11 +115,9 @@ var ReactPlayground = React.createClass({ compiledCode = this.compileCode(); } catch (err) {} - // we're creating both versions, to avoid the flicker when switching from - // one view to another when CodeMirror recompiles var jsContent =
- {jsxContent} - {jsContent} + {isJS ? jsContent : jsxContent}