creatClass codemod

Reviewed By: sebmarkbage

Differential Revision: D5484225

fbshipit-source-id: dc1414862e5823d1aa925f27a68f596ada627b48
This commit is contained in:
Brian Vaughn
2017-07-25 10:12:58 -07:00
committed by Facebook Github Bot
parent f445ac8ef1
commit fca30005a2
33 changed files with 346 additions and 261 deletions

View File

@@ -19,13 +19,8 @@ function getGitHubPath(path) {
return 'https://github.com/facebook/react-native/blob/master/' + path;
}
var HeaderWithGithub = React.createClass({
contextTypes: {
version: PropTypes.string
},
render: function() {
class HeaderWithGithub extends React.Component {
render() {
return (
<table width="100%">
<tbody>
@@ -47,6 +42,10 @@ var HeaderWithGithub = React.createClass({
</table>
);
}
});
}
HeaderWithGithub.contextTypes = {
version: PropTypes.string
};
module.exports = HeaderWithGithub;