mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
21 lines
523 B
JavaScript
21 lines
523 B
JavaScript
class Hello extends React.Component { // $ threatModelSource=view-component-input
|
|
render() {
|
|
return <div>Hello {this.props.name}</div>; // $ threatModelSource=view-component-input
|
|
}
|
|
static info() {
|
|
return "Nothing to see here.";
|
|
}
|
|
} // $ reactComponent
|
|
Hello.displayName = 'Hello';
|
|
Hello.defaultProps = {
|
|
name: 'world'
|
|
};
|
|
|
|
class Hello2 extends React.Component {
|
|
constructor() {
|
|
this.state.foo = 42;
|
|
this.state.bar.foo = 42;
|
|
this.state = { baz: 42};
|
|
}
|
|
} // $ reactComponent
|