Skip to content

feat: add select() option to QoraBuilder and useQuery for derived data subscriptions (#22) - #45

Open
donfreddy wants to merge 1 commit into
mainfrom
feat/select-derived-data-22
Open

feat: add select() option to QoraBuilder and useQuery for derived data subscriptions (#22)#45
donfreddy wants to merge 1 commit into
mainfrom
feat/select-derived-data-22

Conversation

@donfreddy

Copy link
Copy Markdown
Collaborator

Closes #22

Description

Adds select parameter to QoraBuilder and useQuery that allows subscribing to a computed subset of the query data. The widget/hook only rebuilds when the selected value changes (compared via ==).

Changes

  • QoraBuilder.select : optional (T data) -> Object? function. When provided, setState is only called when the returned value differs from the previous value.
  • useQuery.select : same pattern for hooks, using useRef to track the previous selected value.
  • Tests (2 test cases): rebuild skipped on same value, null data safety
  • Backward compatible: without select, behavior is unchanged

@donfreddy
donfreddy force-pushed the feat/select-derived-data-22 branch from a0479ba to c8066b6 Compare July 15, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add select option to QoraBuilder for derived data subscriptions

1 participant