Last active
November 12, 2015 12:08
-
-
Save tkers/a30830afe8408756d254 to your computer and use it in GitHub Desktop.
demo for jsx-eslint/eslint-plugin-react#269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"es6": true | |
}, | |
"plugins": [ | |
"react" | |
], | |
"ecmaFeatures": { | |
"jsx": true, | |
"experimentalObjectRestSpread": true | |
}, | |
"rules": { | |
"react/prop-types": 2 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var React = require("react"); | |
var MyComponent = React.createClass({ | |
render : function () { | |
var {...other} = this.props; | |
return ( | |
<div {...other} /> | |
); | |
} | |
}); | |
module.exports = MyComponent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment