Const
Returns the combined monitor snapshot and re-renders when any collector changes. Pass a selector to re-render only when the selected part changes.
const lcp = useMonitor(monitor, (snap) => snap.webVitals.lcp?.value ?? null) Copy
const lcp = useMonitor(monitor, (snap) => snap.webVitals.lcp?.value ?? null)
Returns the combined monitor snapshot and re-renders when any collector changes. Pass a selector to re-render only when the selected part changes.