Repository navigation
Version Packages - #78
Merged
Merged
Conversation
abedell-phantom
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
fetchium@1.0.0
Major Changes
TypeError; copy it first ([...data.items].sort()).SyncQueryStore. Update tests that wait for a loading state or count renders.debouncestart on a microtask, not aftersetTimeout(0); update tests that advance timers to see them.isFetchinginstead of counting renders.t.object,t.recordand live-collection values are new objects after a change, so memoized children re-render; drop workarounds that forced it.t.recordandt.resultfields apply updates instead of keeping their old value.QueryClient.destroy()aborts fetches in flight. Code that awaits a query during teardown gets anAbortError; catch it.await fetchQuery(...)waits for the next mount,gcTimecollection ordestroy()instead of rejecting with anAbortError.QueryClientConfignames:shouldRetry,reactivationGraceMs,reactivationStaggerMs,activityandpollResumeJitterMsare read as options; rename custom context values that use them.retry: {}andretry: { retryDelay }now retry likeretry: true; useretry: falsefor no retries.AsyncQueryStorehonorscache.maxCount. Check the value if you set one.QueryStores get new optional methods (mergeEntity,onDelete,onPersisted,isSettled,hasQueuedDeletes,hasEntity); without them nothing changes.Minor Changes
82d67fc: New
queryClient.prefetch(Query, params, { ttl })andqueryClient.retain(fn, { ttl })start queries before any component reads them. A component that mounts while one is held reuses its request and renders the data on its first render if it has arrived. Both return areleasefunction;prefetchlasts 10 seconds by default andretainuntil released.New
useSuspenseQueryinfetchium/react. It suspends only while the query has no data yet, and sends a failed first fetch to the error boundary.debouncestarts on a microtask instead of aftersetTimeout(0)..valueon a pending or failed query doesn't suspend or throw. The docs said it did.46e004f: New
QueryClientoptions that make coming back to a screen, or to the app, quieter. All are off by default.reactivationGraceMs(also per query): a query that mounts again with data younger than this doesn't refetch. Data a live subscription kept current counts as fresh.reactivationStaggerMs: refetches from queries that mount together are spread across this window instead of all starting at once.activity: { isActive(), subscribe(listener) }:poll()stops while the app is inactive and resumes when it's active again. On React Native, wrapAppState.pollResumeJitterMsspreads out polls that were overdue on resume.TopicQueryAdapter.sendMutationEvent(event, topic)so that topic's query counts the push as fresh data.82d67fc: New optional
shouldRetry(error, attempt, status)onQueryClientConfigand on a query's or mutation'sretryconfig. Returnfalseto stop retrying an error you know is permanent, such as a 404.statusis the HTTP status when it is known, andgetErrorStatusis exported. Without the hook, retries work as before.retry.retriesis now optional.5c6824d: A refetch, poll or streamed update that returns the same data no longer re-renders your components.
isPendingandisFetchingstill change as before.Date, a typed array, a class instance) always count as changed.t.record(...)fields now apply updates. Previously a record field kept its old value.Patch Changes
a23ad4b: Fixed spurious errors and wrong data when a query mounts, unmounts or changes params quickly.
AbortError. The query shows its cached data, or stays pending, while it refetches. One exception: a topic query with no data that mounts and unmounts in the same task shows theAbortErroron its next mount until its data arrives (before, it stayed pending forever).QueryClient.destroy()aborts every fetch in flight, and code awaiting one gets anAbortError.33458ce:
AsyncQueryStorenow honors a query'scache.maxCount, asSyncQueryStoredoes. It used to always keep the default of 50 keys.a23ad4b:
useSuspenseQueryno longer refetches in a loop when a slow retry render takes a while to reach the component. The error goes to the error boundary, and resetting the boundary retries.Custom
QueryClientConfigkeys still reach queries asthis.context, except the reserved option namesshouldRetry,reactivationGraceMs,reactivationStaggerMs,activityandpollResumeJitterMs. An invalid value for one of these options is ignored instead of breaking queries.5c6824d: Query results rebuild faster after an update: entities whose data didn't change are not read again.
List results also keep each row's object identity when the list is inserted into or re-sorted, so memoized rows don't re-render. Development builds still re-read everything to check the result, so the speedup shows in production builds only.
a23ad4b: Fixed memoized children (
component()orReact.memo) showing a stale value when given a nested value such astoken.priceas a prop. A nestedt.object,t.recordor live-collection value is now a new object when it changes, and keeps its identity when it doesn't.5c636ff: Streamed updates write each changed entity to the store once instead of two or three times, and an update that changes nothing writes nothing.
A
createevent for an entity that no live collection shows is no longer written to the store, where it was never cleaned up.46e237f: Fixed stale data in components when a second query loads entities that are already in memory, and streamed updates that were lost on restart.
sort()on a list in render) throws aTypeError. Copy the data first, and treat production results as read-only too.QueryStore.mergeEntity, so an entity built from streamed updates doesn't overwrite stored fields those updates didn't include. Without it, writes work as before.33458ce: Fixed components not updating when an entity changes inside a union that has an array or record member, such as
t.union(t.array(t.entity(A)), t.object({ ... })).33458ce: Fixed cached queries failing to load after a restart ("the query cache may be corrupted or invalid") when a query had more than
cache.maxCountcached params and refetched unchanged data.QueryStorehas a new optionalonDelete(listener). Call the listener with every id the store deletes on its own. A store without it keeps writing every update, as before.t.array(t.entity(X))field whose typename two entity classes share now shows an item as soon as it gains the fieldsXrequires.0600009: With
SyncQueryStore, a cached query renders its data on the first render instead of showing a loading frame first.setTimeout(0). Tests that wait for a loading state or count renders may need updating.a23ad4b: Faster streamed updates with
SyncQueryStorefor entities that aren't in memory, which is common when two entity classes share a typename.