File tree 3 files changed +14
-16
lines changed
3 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 16
16
"lodash" : " ^4.0.1" ,
17
17
"normalizr" : " ^2.0.0" ,
18
18
"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" ,
21
21
"react-redux" : " ^4.0.0" ,
22
22
"redux" : " ^3.0.0" ,
23
23
"redux-logger" : " ^2.0.2" ,
Original file line number Diff line number Diff line change 6
6
"dependencies" : {
7
7
"babel-standalone" : " ^6.24.0" ,
8
8
"classnames" : " ^2.2.5" ,
9
+ "codemirror" : " ^5.30.0" ,
9
10
"github-markdown-css" : " ^2.5.0" ,
10
11
"marked" : " ^0.3.6" ,
11
12
"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 " ,
16
17
"react-redux" : " ^5.0.3" ,
17
18
"react-router-dom" : " ^4.0.0" ,
18
19
"redux" : " ^3.6.0" ,
19
- "redux-query" : " .." ,
20
+ "redux-query" : " file: .." ,
20
21
"rimraf" : " ^2.4.3" ,
21
- "styled-components" : " ^1.4.4 "
22
+ "styled-components" : " ^2.2.1 "
22
23
},
23
24
"devDependencies" : {
24
25
"eslint" : " ^3.3.1" ,
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
- import CodeMirror from 'react-codemirror ' ;
2
+ import CodeMirror from 'react-codemirror2 ' ;
3
3
import styled from 'styled-components' ;
4
4
5
5
import 'codemirror/lib/codemirror.css' ;
@@ -205,11 +205,8 @@ class Playground extends Component {
205
205
return (
206
206
< Code >
207
207
< 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%' ) ;
213
210
} }
214
211
options = { {
215
212
lineNumbers : true ,
@@ -223,9 +220,9 @@ class Playground extends Component {
223
220
} ,
224
221
} ,
225
222
} }
226
- onChange = { newValue => {
223
+ onChange = { ( editor , metadata , value ) => {
227
224
this . setState ( {
228
- [ stateKey ] : newValue ,
225
+ [ stateKey ] : value ,
229
226
isDirty : true ,
230
227
} ) ;
231
228
} }
You can’t perform that action at this time.
0 commit comments