File tree Expand file tree Collapse file tree 3 files changed +14
-16
lines changed Expand file tree Collapse file tree 3 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 1616 "lodash" : " ^4.0.1" ,
1717 "normalizr" : " ^2.0.0" ,
1818 "prop-types" : " ^15.5.6" ,
19- "react" : " ^0.14 .0" ,
20- "react-dom" : " ^0.14 .0" ,
19+ "react" : " ^16.0 .0" ,
20+ "react-dom" : " ^16.0 .0" ,
2121 "react-redux" : " ^4.0.0" ,
2222 "redux" : " ^3.0.0" ,
2323 "redux-logger" : " ^2.0.2" ,
Original file line number Diff line number Diff line change 66 "dependencies" : {
77 "babel-standalone" : " ^6.24.0" ,
88 "classnames" : " ^2.2.5" ,
9+ "codemirror" : " ^5.30.0" ,
910 "github-markdown-css" : " ^2.5.0" ,
1011 "marked" : " ^0.3.6" ,
1112 "prettier" : " 0.21.0" ,
12- "react" : " ^15.4.2 " ,
13- "react-codemirror " : " ^0.3.0 " ,
14- "react-dom" : " ^15.4.2 " ,
15- "react-inspector" : " ^1.1.2 " ,
13+ "react" : " ^16.0.0 " ,
14+ "react-codemirror2 " : " ^2.0.2 " ,
15+ "react-dom" : " ^16.0.0 " ,
16+ "react-inspector" : " ^2.2.0 " ,
1617 "react-redux" : " ^5.0.3" ,
1718 "react-router-dom" : " ^4.0.0" ,
1819 "redux" : " ^3.6.0" ,
19- "redux-query" : " .." ,
20+ "redux-query" : " file: .." ,
2021 "rimraf" : " ^2.4.3" ,
21- "styled-components" : " ^1.4.4 "
22+ "styled-components" : " ^2.2.1 "
2223 },
2324 "devDependencies" : {
2425 "eslint" : " ^3.3.1" ,
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
2- import CodeMirror from 'react-codemirror ' ;
2+ import CodeMirror from 'react-codemirror2 ' ;
33import styled from 'styled-components' ;
44
55import 'codemirror/lib/codemirror.css' ;
@@ -205,11 +205,8 @@ class Playground extends Component {
205205 return (
206206 < Code >
207207 < CodeMirror
208- ref = { ref => {
209- if ( ref ) {
210- const cm = ref . getCodeMirror ( ) ;
211- cm . setSize ( '100%' , '100%' ) ;
212- }
208+ editorDidMount = { editor => {
209+ editor . setSize ( '100%' , '100%' ) ;
213210 } }
214211 options = { {
215212 lineNumbers : true ,
@@ -223,9 +220,9 @@ class Playground extends Component {
223220 } ,
224221 } ,
225222 } }
226- onChange = { newValue => {
223+ onChange = { ( editor , metadata , value ) => {
227224 this . setState ( {
228- [ stateKey ] : newValue ,
225+ [ stateKey ] : value ,
229226 isDirty : true ,
230227 } ) ;
231228 } }
You can’t perform that action at this time.
0 commit comments