Pilates
    Preparing search index...

    Function useLayoutProfiler

    • Observe the Spineless layout engine: returns the latest LayoutTrace, a bounded recent history, and cumulative per-path totals.

      The hook registers a @pilates/core profiler listener on mount and clears it on unmount. setLayoutProfiler is a single global slot — use one useLayoutProfiler (or one <LayoutDevtools>) per app.

      The hook does NOT self-trigger re-renders: a profiler's state changes on every layout, so a post-commit force would loop forever. It returns the accumulated state on every render the consumer drives; the panel is thus one completed layout behind — imperceptible in an interactive app, which re-renders to produce the layouts profiled.

      Returns LayoutProfile