Skip to content
Version: xstate@5.0.0

State.matches() method​

Whether the current state value is a subset of the given parent state value.

Signature:

matches<TSV extends TResolvedTypesMeta extends TypegenEnabled ? Prop<Prop<TResolvedTypesMeta, 'resolved'>, 'matchesStates'> : StateValue>(parentStateValue: TSV): boolean;

Parameters​

ParameterTypeDescription
parentStateValueTSV

Returns:

boolean