forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprops.js
More file actions
36 lines (24 loc) · 1.13 KB
/
props.js
File metadata and controls
36 lines (24 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function ES2015() {
class C extends React.Component { // $ threatModelSource=view-component-input
} // $ reactComponent
C.defaultProps = { propFromDefaultProps: "propFromDefaultProps" }; // $ getACandidatePropsValue
(<C propFromJSX={"propFromJSX"}/>); // $ getACandidatePropsValue
new C({propFromConstructor: "propFromConstructor"}); // $ getACandidatePropsValue
}
function ES5() {
var C = React.createClass({
getDefaultProps() {
return { propFromDefaultProps: "propFromDefaultProps" }; // $ getACandidatePropsValue
}
}); // $ reactComponent
(<C propFromJSX={"propFromJSX"}/>); // $ getACandidatePropsValue
C({propFromConstructor: "propFromConstructor"}); // $ getACandidatePropsValue
}
function Functional() {
function C(props) { // $ threatModelSource=view-component-input
return <div/>;
} // $ reactComponent
C.defaultProps = { propFromDefaultProps: "propFromDefaultProps" }; // $ getACandidatePropsValue
(<C propFromJSX={"propFromJSX"}/>); // $ getACandidatePropsValue
new C({propFromConstructor: "propFromConstructor"}); // $ getACandidatePropsValue
}