Skip to content

ReactDetector

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/react-detector.ts

React Detector

Methods

MethodSignatureReturns
detectdetect(entities: Entity[])DetectedReactComponent[]
getComponentSummarygetComponentSummary(component: DetectedReactComponent)string

Where it refuses work

  • ReactDetector stops the work with an early return when !/^[A-Z]/.test(name).
  • ReactDetector stops the work with an early return when /class\s+\w+\s+extends\s+(?:React\.)?Component/.test(code).
  • ReactDetector stops the work with an early return when fcMatch.
  • ReactDetector stops the work with an early return when propsMatch.
  • ReactDetector stops the work with an early return when funcPropsMatch.
  • ReactDetector stops the work with an early return when arrowPropsMatch.

Was this page helpful?

Download as PDF