Skip to content

Commit a6160d0

Browse files
authored
Add support for React 15 (redfin#279)
* Update react dependencies to `^15.1.0` * Reduce "react-text" comments in navigation playground Due to https://facebook.github.io/react/tips/children-props-type.html: > when there is only a single child, this.props.children will be the single > child component itself without the array wrapper. This saves an array > allocation. * Add a key to test pages index list elements Just eliminating a warning * Support react@"~0.14.2 || ^15.1.0"
1 parent 6686a67 commit a6160d0

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

packages/react-server-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"lodash": "^4.16.4",
1111
"mkdirp": "^0.5.1",
1212
"q": "1.4.1",
13-
"react": "~0.14.2",
14-
"react-dom": "~0.14.2",
13+
"react": "~0.14.2 || ^15.1.0",
14+
"react-dom": "~0.14.2 || ^15.1.0",
1515
"react-server": "^0.4.13",
1616
"react-server-cli": "^0.4.13",
1717
"rimraf": "^2.5.4",

packages/react-server-test-pages/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"dependencies": {
1616
"lodash": "^4.16.4",
1717
"q": "1.4.1",
18-
"react": "~0.14.2",
19-
"react-dom": "~0.14.2",
18+
"react": "~0.14.2 || ^15.1.0",
19+
"react-dom": "~0.14.2 || ^15.1.0",
2020
"react-server": "^0.4.13",
2121
"react-server-cli": "^0.4.13",
2222
"react-server-data-bundle-cache": "^0.4.13",

packages/react-server-test-pages/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default class IndexPage {
55
getElements() {
66
return <div>
77
<h1>Entrypoints:</h1>
8-
<ul>{_.map(entrypoints, (val, key) => <li>
8+
<ul>{_.map(entrypoints, (val, key) => <li key={key}>
99
<a href={val.entry}>{val.description||key}</a>
1010
</li>)}</ul>
1111
<h2>Homepage Aliases:</h2>

packages/react-server-test-pages/pages/navigation/playground.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class FBL extends React.Component {
102102
render() {
103103
return <Link path={LINK(this.props.row)} frameback={true} {...this.props.link}>
104104
<span className={this.state.available?'available':'not-available'}>FB</span>{
105-
this.props.children?['/',...this.props.children]:[]
105+
this.props.children?['/',...React.Children.toArray(this.props.children)]:[]
106106
}
107107
</Link>
108108
}

packages/react-server-website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"babel-plugin-transform-runtime": "^6.15.0",
1717
"babel-runtime": "^6.18.0",
1818
"highlight.js": "^9.5.0",
19-
"react": "~0.14.2",
20-
"react-dom": "~0.14.2",
19+
"react": "~0.14.2 || ^15.1.0",
20+
"react-dom": "~0.14.2 || ^15.1.0",
2121
"react-server": "^0.4.13",
2222
"react-server-cli": "^0.4.13",
2323
"react-server-data-bundle-cache": "^0.4.13",

packages/react-server/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"winston": "2.2.0"
3838
},
3939
"peerDependencies": {
40-
"react": "~0.14.2",
41-
"react-dom": "~0.14.2",
40+
"react": "~0.14.2 || ^15.1.0",
41+
"react-dom": "~0.14.2 || ^15.1.0",
4242
"superagent": "1.8.4"
4343
},
4444
"devDependencies": {
@@ -58,9 +58,9 @@
5858
"gulp-istanbul": "^1.1.1",
5959
"gulp-if": "^2.0.1",
6060
"gulp-eslint": "^3.0.1",
61-
"react": "~0.14.2",
61+
"react": "~0.14.2 || ^15.1.0",
62+
"react-dom": "~0.14.2 || ^15.1.0",
6263
"superagent": "1.8.4",
63-
"react-dom": "~0.14.2",
6464
"eslint-plugin-react": "^6.4.1",
6565
"babel-eslint": "^7.0.0",
6666
"eslint": "^3.8.1",

0 commit comments

Comments
 (0)