Matcher <Props, Options>
Implements
- MatcherInterface<Props>
Index
Constructors
Properties
Methods
Constructors
constructor
Type parameters
- Props: object = {}
- Options: object = {}
Properties
factory
greedy
inverseName
options
propName
Methods
abstractasTag
createElement
Attempts to create a React element using a custom user provided factory, or the default matcher factory.
doMatch
Trigger the actual pattern match and package the matched response through a callback.
Type parameters
- T
abstractmatch
Attempt to match against the defined string. Return
null
if no match found, else return thematch
and any optional props to pass along.
onAfterParse
Callback triggered after parsing.
onBeforeParse
Callback triggered before parsing.
abstractreplaceWith
Replace the match with a React element based on the matched token and optional props.
Defines the HTML tag name that the resulting React element will be.