use XPath
Type: Function
How to get useXPath?
JavaScript
import useXPath from 'fontoxml-fx/src/useXPath.js'
A React hook which runs the given XPath expression on the given context and observes the result. Whenever one of the inputs changes or whenever the result of the current inputs change, the result is recomputed and returned.
Arguments
expression
(Required)
Type: String
The XPath expression to evaluate.
context
(Required)
Type: Object | NULL
The context for the XPath expression.
Default value
options
(Optional)
Type: Object
Properties
Default value
Returns
Type: any | NULL
The result of the given XPath expression in the given returnType.