react-profiler-component-source
Find a React component's source code via AST lookup, returning file path, line number, memoization details, and 50 lines of source for review before proposing fixes.
Instructions
Find a React component's source via tree-sitter AST lookup: returns file path, line number, memoization status (isMemoized, hasUseCallback, hasUseMemo), and 50 lines of source for a named React component. Call this per-finding after react-profiler-analyze to inspect source before proposing a fix. Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules). When several files define a component with the same name (e.g. platform variants like List.tsx and List.web.tsx), returns the primary match and lists the rest under otherMatches[] (file/line/col) — check it before assuming the returned file is the one you meant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_root | Yes | Absolute path to the RN project root | |
| component_name | Yes | Name of the React component to look up |