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

Method is_component_wrapper_call

codegraph-kernel/src/tsjs/extractors.rs:466–470  ·  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

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