Class React::FunctionalComponent

A React component implemented as a plain function.

Direct supertypes

Indirect supertypes

Predicates

getADefaultPropsSource

Gets the object that specifies default values for (some of) this components’ props.

getADirectPropsAccess

Gets an access to the props object of this component.

getAbstractComponent

Gets the abstract value that represents this component.

getComponentCreatorSource

Gets the value that instantiates this component when invoked.

getInstanceMethod

Gets an instance method of this component with the given name.

getStaticMethod

Gets a static method of this component with the given name.

Inherited predicates

analyze

Gets type inference results for this element.

from ValueNode
declaresArguments

Holds if this function declares a parameter or local variable named arguments.

from Function
describe

Gets a description of this function.

from Function
flow

Gets the data flow node associated with this program element.

from ValueNode
getABodyStmt

Gets a statement in the body of this function.

from Function
getACandidatePropsSource

Gets a value that will become (part of) the props object of this component, for example the argument to the constructor of this component.

from ReactComponent
getACandidatePropsValue

Gets an expression that will become the value of the props property name of this component, for example the attribute value of a JSX element that instantiates this component.

from ReactComponent
getACandidateStateSource

Gets a value that will become (part of) the state object of this component, for example an assignment to this.state.

from ReactComponent
getAChild

Gets a child node of this node.

from ASTNode
getAChildExpr

Gets a child expression of this node.

from ASTNode
getAChildStmt

Gets a child statement of this node.

from ASTNode
getADirectStateAccess

Gets an access to the state object of this component.

from ReactComponent
getAMethodCall

Gets a call to method name on this component.

from ReactComponent
getAParameter

Gets a parameter of this function.

from Function
getAPreviousPropsSource

Gets a value that used to be the props object of this component, for example the prevProps parameter of the comoponentDidUpdate method of this component.

from ReactComponent
getAPreviousStateSource

Gets a value that used to be the state object of this component, for example the prevState parameter of the comoponentDidUpdate method of this component.

from ReactComponent
getAPropRead

Gets a data flow node that reads a prop of this component.

from ReactComponent
getAPropRead

Gets a data flow node that reads prop name of this component.

from ReactComponent
getAReturnStmt

Gets a return statement in the body of this function, if any.

from Function
getAReturnedExpr

Gets an expression that could be returned by this function, if any.

from Function
getAStateAccess

Gets an expression that accesses a (transitive) property of the state object of this component.

from ReactComponent
getAStmt

Gets a statement that belongs to this container.

from StmtContainer
getAThisNode

Gets the this node in an instance method of this component.

from ReactComponent
getAToken

Gets a token belonging to this element.

from ASTNode
getATypeParameter

Gets any type parameter declared on this function or type.

from TypeParameterized
getArgumentsVariable

Gets the arguments variable of this function, if any.

from Function
getBody

Gets the body of this function.

from Function
getBodyStmt

Gets the ith statement in the body of this function.

from Function
getCanonicalName

Gets the canonical name for this function, as determined by the TypeScript compiler.

from Function
getChild

Gets the ith child node of this node.

from ASTNode
getChildExpr

Gets the ith child expression of this node.

from ASTNode
getChildStmt

Gets the ith child statement of this node.

from ASTNode
getChildTypeExpr

Gets the ith child type expression of this node.

from ASTNode
getCyclomaticComplexity

Gets the cyclomatic complexity of this function.

from Function
getDocumentation

Gets the JSDoc comment for this element, if any.

from Documentable
getEnclosingContainer

Gets the enclosing function or toplevel of this function.

from Function
getEnclosingStmt

Gets the statement enclosing this function, if any.

from Function
getEndLine

Gets the line on which this element ends.

from Locatable
getEntry

Gets the (unique) entry node of the control flow graph for this toplevel or function.

from StmtContainer
getEntryBB

Gets the entry basic block of this function, that is, the basic block containing the entry node of its CFG.

from StmtContainer
getExit

Gets the (unique) exit node of the control flow graph for this toplevel or function.

from StmtContainer
getFile

Gets the file this program element comes from.

from Locatable
getFirstControlFlowNode

Gets the first control flow node belonging to this syntactic entity.

from ASTNode
getFirstToken

Gets the first token belonging to this element.

from ASTNode
getFunctionBoundary

Gets the innermost enclosing function or top-level, possibly this container itself if it is a function or top-level.

from StmtContainer
getId

Gets the identifier specifying the name of this function, if any.

from Function
getLastToken

Gets the last token belonging to this element.

from ASTNode
getLocation

Gets this element’s location.

from ASTNode
getName

Gets the name of this function, if any.

from Function
getNumBodyStmt

Gets the number of statements in the body of this function.

from Function
getNumChild

Gets the number of child nodes of this node.

from ASTNode
getNumChildExpr

Gets the number of child expressions of this node.

from ASTNode
getNumChildStmt

Gets the number of child statements of this node.

from ASTNode
getNumLines

Gets the number of lines covered by this element.

from Locatable
getNumParameter

Gets the number of parameters declared by this element.

from Parameterized
getNumTypeParameter

Gets the number of type parameters declared on this function or type.

from TypeParameterized
getNumberOfLines

Gets the number of lines in this function.

from Function
getNumberOfLinesOfCode

Gets the number of lines containing code in this function.

from Function
getNumberOfLinesOfComments

Gets the number of lines containing comments in this function.

from Function
getParameter

Gets the ith parameter of this function.

from Function
getParameterByName

Gets the parameter named name of this function, if any.

from Function
getParameterVariable

Gets a variable of the given name that is a parameter of this element.

from Parameterized
getParent

Gets the parent node of this node, if any.

from ASTNode
getRenderMethod

Gets the render method of this component.

from ReactComponent
getReturnTypeAnnotation

Gets the return type annotation on this function, if any.

from Function
getScope

Gets the scope induced by this toplevel or function, if any.

from StmtContainer
getStart

Gets the (unique) CFG node at which execution of this toplevel or function begins.

from StmtContainer
getStartBB

Gets the start basic block of this function, that is, the basic block containing the start node of its CFG.

from StmtContainer
getStartLine

Gets the line on which this element starts.

from Locatable
getThisBinder

Gets the function whose this binding a this expression in this function refers to, which is the nearest enclosing non-arrow function.

from Function
getThisBindingContainer

Gets the function or top-level whose this binding a this expression in this function refers to, which is the nearest enclosing non-arrow function or top-level.

from Function
getThisTypeAnnotation

Gets the type annotation for the special this parameter, if it is present.

from Function
getTopLevel

Gets the toplevel syntactic unit to which this element belongs.

from ASTNode
getTypeParameter

Gets the nth type parameter declared on this function.

from Function
getVariable

Gets the variable holding this function.

from Function
hasBody

Holds if this function has a body.

from Function
hasDefaultProps

Holds if this component specifies default values for (some of) its props.

from ReactComponent
hasMappedArgumentsVariable

Holds if this function has a mapped arguments variable whose indices are aliased with the function’s parameters.

from Function
hasRestParameter

Holds if the last parameter of this function is a rest parameter.

from Function
hasTrailingComma

Holds if the parameter list of this function has a trailing comma.

from Function
hasTypeParameters

Holds if this function or type declares any type parameters.

from TypeParameterized
inExternsFile

Holds if this syntactic entity belongs to an externs file.

from ASTNode
isAbstract

Holds if this function is part of an abstract class member.

from Function
isAmbient

Holds if this is part of an ambient declaration or type annotation in a TypeScript file.

from Function
isAsync

Holds if this function is an asynchronous function.

from Function
isGenerator

Holds if this function is a generator function.

from Function
isNonConstructible

Holds if this function cannot be invoked using new because it is of the given kind.

from Function
isStrict

Holds if the code in this container is executed in ECMAScript strict mode.

from Function
ref

Gets a reference to this component.

from ReactComponent
toString

Gets a textual representation of this element.

from Locatable
usesArgumentsObject

Holds if the body of this function refers to the function’s arguments variable.

from Function

Charpred