Prometheus Entity Management API
    Preparing search index...
    • Creates a fine-grained SolidJS reactive primitive for a single entity.

      • Uses createResource as the async driver so Suspense and ErrorBoundary boundaries work naturally.
      • Subscribes to the Zustand graph with graphStore.subscribe and mirrors the merged entity into a createStore-backed signal for fine-grained SolidJS reactivity (only the changed field triggers updates).
      • Registers / unregisters a subscriber token with the core engine so idle entities stop background revalidation when no components are observing them.

      Type Parameters

      • TRaw
      • TEntity extends object

      Parameters

      Returns CreateEntityReturn<TEntity>

      const invoice = createEntity({
      type: "Invoice",
      id: () => props.invoiceId,
      fetch: (id) => api.get(`/invoices/${id}`),
      normalize: (raw) => ({ ...raw, id: raw.invoice_id }),
      });

      return (
      <Show when={!invoice.isLoading()} fallback={<Spinner />}>
      <p>{invoice.data()?.amount}</p>
      </Show>
      );