Skip to content

isReactComponent

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/frontend-parser/src/utils/ast-helpers.ts

Check if a function component is a React component (returns JSX)

Signature

ts
function isReactComponent(path: NodePath<t.FunctionDeclaration | t.ArrowFunctionExpression | t.FunctionExpression>): boolean

Parameters

NameType
path`NodePath<t.FunctionDeclaration

Returns: boolean

Was this page helpful?

Download as PDF