File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
lib/semmle/javascript/frameworks
test/library-tests/frameworks/ReactJS Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -802,6 +802,8 @@ private DataFlow::SourceNode higherOrderComponentBuilder() {
802802 or
803803 result = DataFlow:: moduleMember ( "recompose" , _) .getACall ( )
804804 or
805+ result = DataFlow:: moduleMember ( [ "mobx-react" , "mobx-react-lite" ] , "observer" )
806+ or
805807 result = reactRouterDom ( ) .getAPropertyRead ( "withRouter" )
806808 or
807809 exists ( FunctionCompositionCall compose |
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ getACandidatePropsValue
1010| props.js:30:46:30:67 | "propFr ... tProps" |
1111| props.js:32:22:32:34 | "propFromJSX" |
1212| props.js:34:33:34:53 | "propFr ... ructor" |
13+ | useHigherOrderComponent.jsx:5:33:5:37 | "red" |
14+ | useHigherOrderComponent.jsx:11:39:11:44 | "lazy" |
1315| useHigherOrderComponent.jsx:17:40:17:46 | "lazy2" |
1416getACandidateStateSource
1517| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:22:18:31 | { baz: 42} |
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import SomeComponent from './higherOrderComponent';
22import { lazy } from 'react' ;
33
44function foo ( ) {
5- return < SomeComponent color = "red" /> // $ MISSING: getACandidatePropsValue
5+ return < SomeComponent color = "red" /> // $ getACandidatePropsValue
66}
77
88const LazyLoadedComponent = lazy ( ( ) => import ( './higherOrderComponent' ) ) ;
99
1010function bar ( ) {
11- return < LazyLoadedComponent color = "lazy" /> // $ MISSING: getACandidatePropsValue
11+ return < LazyLoadedComponent color = "lazy" /> // $ getACandidatePropsValue
1212}
1313
1414const LazyLoadedComponent2 = lazy ( ( ) => import ( './exportedComponent' ) . then ( m => m . MyComponent ) ) ;
You can’t perform that action at this time.
0 commit comments