TinyBase logoTinyBase β

Metrics primitives

useCreateMetrics

The useCreateMetrics primitive is used to create a Metrics object within a Solid application with convenient memoization. Read more.

useMetric

The useMetric primitive gets the current value of a Metric, and registers a listener so that any changes to that result will cause an update. Read more.

useMetricIds

The useMetricIds primitive gets an array of the Metric Ids registered with a Metrics object, and registers a listener so that any changes to that result will cause an update. Read more.

useMetricListener

The useMetricListener primitive registers a listener function with the Metrics object that will be called whenever the value of a specified Metric changes. Read more.

useMetrics

The useMetrics primitive is used to get a reference to a Metrics object from within a Provider component context. Read more.

useMetricsIds

The useMetricsIds primitive is used to retrieve the Ids of all the named Metrics objects present in the current Provider component context. Read more.

useMetricsOrMetricsById

The useMetricsOrMetricsById primitive is used to get a reference to a Metrics object from within a Provider component context, or have it passed directly to this primitive. Read more.

useProvideMetrics

The useProvideMetrics primitive is used to add a Metrics object by Id to a Provider component, but imperatively from a component within it. Read more.