Skip to content

Commit 4b2809d

Browse files
committed
upgrade to react 15.5
1 parent 004d6d1 commit 4b2809d

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

lib/react-most.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import initHistory from './history';
34
import { from } from 'most';
45
import mostEngine from './engine/most';
@@ -8,9 +9,9 @@ export const HISTORY_STREAM = '@@reactive-react/react-most.historyStream';
89
const MERGE_OBSERVE = '@@reactive-react/react-most.mergeObserve';
910

1011
const CONTEXT_TYPE = {
11-
[INTENT_STREAM]: React.PropTypes.object,
12-
[HISTORY_STREAM]: React.PropTypes.object,
13-
[MERGE_OBSERVE]: React.PropTypes.func,
12+
[INTENT_STREAM]: PropTypes.object,
13+
[HISTORY_STREAM]: PropTypes.object,
14+
[MERGE_OBSERVE]: PropTypes.func,
1415
};
1516

1617
function pick(names, obj) {
@@ -118,8 +119,7 @@ export function connect(main, opts = {}) {
118119
};
119120
}
120121

121-
let Most = React.createClass({
122-
childContextTypes: CONTEXT_TYPE,
122+
export default class Most extends React.PureComponent {
123123
getChildContext() {
124124
let engineClass = (this.props && this.props.engine) || mostEngine;
125125
let engine = engineClass();
@@ -132,13 +132,12 @@ let Most = React.createClass({
132132
[MERGE_OBSERVE]: engine.mergeObserve,
133133
[HISTORY_STREAM]: engine.historyStream,
134134
};
135-
},
135+
}
136136
render() {
137137
return React.Children.only(this.props.children);
138-
},
139-
});
140-
141-
export default Most;
138+
}
139+
}
140+
Most.childContextTypes = CONTEXT_TYPE;
142141

143142
function observable(obj) {
144143
return !!obj.subscribe;

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
"dependencies": {
2929
"most": "^1.2.2",
3030
"most-subject": "^5.2.0",
31-
"rxjs": "^5.0.0-rc.4"
31+
"rxjs": "^5.0.0-rc.4",
32+
"prop-types": "^15.5.8"
3233
},
3334
"peerDependencies": {
34-
"react": "^15.3.2"
35+
"react": "^15.5.4"
3536
},
3637
"devDependencies": {
3738
"babel": "^6.1.18",
@@ -43,9 +44,9 @@
4344
"jest": "^19.0.0",
4445
"jest-cli": "^19.0.1",
4546
"lodash": "^4.0.0",
47+
"react": "^15.5.4",
4648
"react-addons-test-utils": "^15.2.0",
47-
"react": "15.3.2",
48-
"react-dom": "^15.3.2",
49+
"react-dom": "^15.5.4",
4950
"react-most-spec": "^0.2.3",
5051
"redux": "^3.0.4"
5152
},

yarn.lock

+24-11
Original file line numberDiff line numberDiff line change
@@ -1080,15 +1080,16 @@ fb-watchman@^2.0.0:
10801080
dependencies:
10811081
bser "^2.0.0"
10821082

1083-
fbjs@^0.8.1, fbjs@^0.8.4:
1084-
version "0.8.6"
1085-
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.6.tgz#7eb67d6986b2d5007a9b6e92e0e7cb6f75cad290"
1083+
fbjs@^0.8.9:
1084+
version "0.8.12"
1085+
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04"
10861086
dependencies:
10871087
core-js "^1.0.0"
10881088
isomorphic-fetch "^2.1.1"
10891089
loose-envify "^1.0.0"
10901090
object-assign "^4.1.0"
10911091
promise "^7.1.1"
1092+
setimmediate "^1.0.5"
10921093
ua-parser-js "^0.7.9"
10931094

10941095
filename-regex@^2.0.0:
@@ -2531,6 +2532,12 @@ promise@^7.1.1:
25312532
dependencies:
25322533
asap "~2.0.3"
25332534

2535+
prop-types@^15.5.7, prop-types@^15.5.8, prop-types@~15.5.7:
2536+
version "15.5.8"
2537+
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394"
2538+
dependencies:
2539+
fbjs "^0.8.9"
2540+
25342541
prr@~0.0.0:
25352542
version "0.0.0"
25362543
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
@@ -2563,25 +2570,27 @@ react-addons-test-utils@^15.2.0:
25632570
version "15.4.1"
25642571
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.4.1.tgz#1e4caab151bf27cce26df5f9cb714f4fd8359ae1"
25652572

2566-
react-dom@^15.3.2:
2567-
version "15.4.1"
2568-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.1.tgz#d54c913261aaedb17adc20410d029dcc18a1344a"
2573+
react-dom@^15.5.4:
2574+
version "15.5.4"
2575+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.5.4.tgz#ba0c28786fd52ed7e4f2135fe0288d462aef93da"
25692576
dependencies:
2570-
fbjs "^0.8.1"
2577+
fbjs "^0.8.9"
25712578
loose-envify "^1.1.0"
25722579
object-assign "^4.1.0"
2580+
prop-types "~15.5.7"
25732581

25742582
react-most-spec@^0.2.3:
25752583
version "0.2.3"
25762584
resolved "https://registry.yarnpkg.com/react-most-spec/-/react-most-spec-0.2.3.tgz#496fc9516688738d6964dfb2c31895c33074360a"
25772585

2578-
react@15.3.2:
2579-
version "15.3.2"
2580-
resolved "https://registry.yarnpkg.com/react/-/react-15.3.2.tgz#a7bccd2fee8af126b0317e222c28d1d54528d09e"
2586+
react@^15.5.4:
2587+
version "15.5.4"
2588+
resolved "https://registry.yarnpkg.com/react/-/react-15.5.4.tgz#fa83eb01506ab237cdc1c8c3b1cea8de012bf047"
25812589
dependencies:
2582-
fbjs "^0.8.4"
2590+
fbjs "^0.8.9"
25832591
loose-envify "^1.1.0"
25842592
object-assign "^4.1.0"
2593+
prop-types "^15.5.7"
25852594

25862595
read-pkg-up@^1.0.1:
25872596
version "1.0.1"
@@ -2791,6 +2800,10 @@ set-immediate-shim@^1.0.1:
27912800
version "1.0.1"
27922801
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
27932802

2803+
setimmediate@^1.0.5:
2804+
version "1.0.5"
2805+
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
2806+
27942807
shellwords@^0.1.0:
27952808
version "0.1.0"
27962809
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14"

0 commit comments

Comments
 (0)