Skip to content

Commit 7899d57

Browse files
committed
Update site and examples to use React 16
1 parent a71bb66 commit 7899d57

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

examples/async/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
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",

site/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@
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",

site/src/components/Playground.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import CodeMirror from 'react-codemirror';
2+
import CodeMirror from 'react-codemirror2';
33
import styled from 'styled-components';
44

55
import '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
}}

0 commit comments

Comments
 (0)