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

Method is_component_wrapper_call

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

371 /// A call reactComponentHoc reads as a component wrapper: `styled…(…)`,
372 /// `memo(…)`, `forwardRef(…)`. Mirrors isComponentWrapperCall.
373 fn is_component_wrapper_call(&self, call: Node<'t>) -> bool {
374 let Some(callee) = call.child_by_field_name("function") else { return false };
375 let text = self.text(callee);
376 util::styled_callee().is_match(text) || is_react_hoc(text)
377 }
378
379 /// Function-as-value candidates (#756) among a wrapper call's arguments,
380 /// 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