Skip to content

ecsia-monorepo / react/src / useQuery

Function: useQuery()

ts
function useQuery(...terms): readonly EntityHandle[];

Defined in: react/src/hooks.ts:25

The handles currently matching terms (the full query DSL: read/write/has/without/ optional; relation Pair terms are deferred to v2). Re-renders ONLY when membership changes — value writes inside matching entities never re-render this hook; render per-entity values with useComponent in a child keyed by the handle.

Parameters

ParameterType
...termsreadonly QueryTerm[]

Returns

readonly EntityHandle[]

MIT licensed · 0.x, unpublished, experimental.