Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Commit

Permalink
Update React development versions to React 16. Update test to avoid d…
Browse files Browse the repository at this point in the history
…eprecated/removed features in React 16
  • Loading branch information
jonathansamines committed Jan 16, 2018
1 parent 745c5b5 commit acdcf78
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 57 deletions.
13 changes: 8 additions & 5 deletions package.json
Expand Up @@ -8,6 +8,9 @@
"lint": "eslint .",
"tape": "tape test/*.js | faucet"
},
"engines": {
"node": ">=4"
},
"repository": {
"type": "git",
"url": "https://github.com/paypal/react-engine"
Expand Down Expand Up @@ -38,16 +41,16 @@
"express": "^4.12",
"faucet": "0.0.1",
"jsdom": "^9.2.1",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react-router": "^2.4.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-router": "^3.2.0",
"rewire": "^2.3.1",
"sinon": "^1.14.1",
"tape": "^4.6.0"
},
"peerDependencies": {
"react": "^15.3.2",
"react-dom": "^15.3.2"
"react": "15.x.x || 16.x.x",
"react-dom": "15.x.x || 16.x.x"
},
"keywords": [
"react",
Expand Down
17 changes: 7 additions & 10 deletions test/fixtures/views/account.jsx
Expand Up @@ -17,13 +17,10 @@

var React = require('react');

module.exports = React.createClass({

render: function() {
return (
<div id='account'>
<h1>{this.props.name || 'Joshua'}</h1>
</div>
);
}
});
module.exports = (props) => {
return (
<div id='account'>
<h1>{props.name || 'Joshua'}</h1>
</div>
);
};
19 changes: 7 additions & 12 deletions test/fixtures/views/app.jsx
Expand Up @@ -16,17 +16,12 @@
'use strict';

var React = require('react');
var Router = require('react-router');
var Layout = require('./layout.jsx');

module.exports = React.createClass({

render: function render() {

return (
<Layout>
{this.props.children}
</Layout>
);
}
});
module.exports = (props) => {
return (
<Layout>
{props.children}
</Layout>
);
};
30 changes: 13 additions & 17 deletions test/fixtures/views/layout.jsx
Expand Up @@ -17,20 +17,16 @@

var React = require('react');

module.exports = React.createClass({

render: function() {

return (
<html>
<head>
<meta charSet='utf-8' />
<title>{this.props.title || 'Hello, world!'}</title>
</head>
<body>
{this.props.children}
</body>
</html>
);
}
});
module.exports = (props) => {
return (
<html>
<head>
<meta charSet='utf-8' />
<title>{props.title || 'Hello, world!'}</title>
</head>
<body>
{props.children}
</body>
</html>
);
};
22 changes: 9 additions & 13 deletions test/fixtures/views/profile.jsx
Expand Up @@ -18,16 +18,12 @@
var React = require('react');
var Layout = require('./layout.jsx');

module.exports = React.createClass({

render: function render() {

return (
<Layout>
<div id='profile'>
<h1>{this.props.name}</h1>
</div>
</Layout>
);
}
});
module.exports = (props) => {
return (
<Layout>
<div id='profile'>
<h1>{props.name}</h1>
</div>
</Layout>
);
};

0 comments on commit acdcf78

Please sign in to comment.