Skip to content

feat: wire initialData/placeholderData into QoraBuilder and useQuery for instant SSR renders (#19) - #38

Open
donfreddy wants to merge 1 commit into
mainfrom
feat/initialData-integration-19
Open

feat: wire initialData/placeholderData into QoraBuilder and useQuery for instant SSR renders (#19)#38
donfreddy wants to merge 1 commit into
mainfrom
feat/initialData-integration-19

Conversation

@donfreddy

Copy link
Copy Markdown
Collaborator

Closes #19

Description

Eagerly seeds the cache with QoraOptions.initialData / placeholderData before the first render in QoraBuilder and useQuery. Eliminates the Initial loading flash, enabling instant renders with SSR/hydration data or placeholder content.

Changes

  • QoraClient.prepopulateCache<T>(key, options) - new public method that eagerly creates a cache entry and applies initialData/placeholderData before any fetch.
  • QoraBuilder - calls prepopulateCache in didChangeDependencies before _subscribe(), so the first build() sees the seeded Success state.
  • useQuery hook - eagerly seeds the cache before useState initialization, so the first render shows pre-populated data.
  • Tests - 3 dart tests for prepopulateCache + 2 Flutter tests for QoraBuilder with initialData
  • Docs EN/FR updated with initialData seeding pattern in QoraBuilder documentation
  • Changelogs updated for both qora and qora_flutter

@donfreddy donfreddy self-assigned this Jul 15, 2026
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 fallbackData / initialData option to seed cache before fetch

1 participant