mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
23 lines
597 B
JavaScript
23 lines
597 B
JavaScript
var Hello = React.createClass({
|
|
displayName: 'Hello',
|
|
render: function() {
|
|
return <div>Hello {this.props.name}</div>; // $ threatModelSource=view-component-input
|
|
},
|
|
getDefaultProps: function() {
|
|
return {
|
|
name: 'world' // $ getACandidatePropsValue
|
|
};
|
|
}
|
|
}); // $ reactComponent
|
|
|
|
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>; // $ threatModelSource=view-component-input
|
|
}
|
|
}); // $ reactComponent
|