This is the collection of metrics hooks within the ui-react
module. There are 4 metrics hooks in total.
useCreateMetrics
The useCreateMetrics
hook is used to create a Metrics
object within a React application with convenient memoization.
useMetric
The useMetric
hook gets the current value of a Metric
, and registers a listener so that any changes to that result will cause a re-render.
useMetricListener
The useMetricListener
hook registers a listener function with the Metrics
object that will be called whenever the value of a specified Metric
changes.
useMetrics
The useMetrics
hook is used to get a reference to a Metrics
object from within a Provider
component context.