MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_component_wrapper_call

Method is_component_wrapper_call

codegraph-kernel/src/tsjs/extractors.rs:464–468  ·  view source on GitHub ↗

A call reactComponentHoc reads as a component wrapper: `styled…(…)`, `memo(…)`, `forwardRef(…)`. Mirrors isComponentWrapperCall.

(&self, call: Node<'t>)

Source from the content-addressed store, hash-verified

462 /// A call reactComponentHoc reads as a component wrapper: `styled…(…)`,
463 /// `memo(…)`, `forwardRef(…)`. Mirrors isComponentWrapperCall.
464 fn is_component_wrapper_call(&self, call: Node<'t>) -> bool {
465 let Some(callee) = call.child_by_field_name("function") else { return false };
466 let text = self.text(callee);
467 util::styled_callee().is_match(text) || is_react_hoc(text)
468 }
469
470 /// Function-as-value candidates (#756) among a wrapper call's arguments,
471 /// attributed to the component — never the component the call wraps.

Callers 1

Calls 2

is_react_hocFunction · 0.85
textMethod · 0.65

Tested by

no test coverage detected