mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
23 lines
440 B
JavaScript
23 lines
440 B
JavaScript
var Hello = React.createClass({
|
|
displayName: 'Hello',
|
|
render: function() {
|
|
return <div>Hello {this.props.name}</div>;
|
|
},
|
|
getDefaultProps: function() {
|
|
return {
|
|
name: 'world'
|
|
};
|
|
}
|
|
});
|
|
|
|
Hello.info = function() {
|
|
return "Nothing to see here.";
|
|
};
|
|
|
|
var createReactClass = require('create-react-class');
|
|
var Greeting = createReactClass({
|
|
render: function() {
|
|
return <h1>Hello, {this.props.name}</h1>;
|
|
}
|
|
});
|