@statezero/core 0.1.95 → 0.1.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,9 +202,9 @@ export class QuerysetStore {
202
202
  typeof this.getRootStore === "function" &&
203
203
  !this.isTemp) {
204
204
  const { isRoot, rootStore } = this.getRootStore(this.queryset);
205
- // If we're not in root mode and have a root store, ALWAYS render from it
206
- // since operations are only routed to root stores now
207
- if (!isRoot && rootStore) {
205
+ // Only render from root if the root has been synced at least once
206
+ // This prevents child stores from getting empty data on first render
207
+ if (!isRoot && rootStore && rootStore.lastSync !== null) {
208
208
  pks = this.renderFromRoot(optimistic, rootStore);
209
209
  }
210
210
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.95",
3
+ "version": "0.1.96",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",