@pinia/colada
1.4.9 · 30 Oct 2026MIT207.8k / weekRepositoryHomepagenpmAtom feed
0.21.7 is the newest release of 0.8.x.
In short
13 breaking5 new4 internal
- Breaking
isFetchingfromuseQuery()is renamed toisLoadingto better reflect that it's connected toasyncStatus. - Breaking
The setup option in useQuery now receives the options as the second argument instead of a context object with the query return value and the options. This allows the setup function to have a more predictable signature and makes it easier to type. Only
PiniaColadahas this option, it has been removed from useQuery. Overall, the option still needs more thinking and will probably change in the future again. - Breaking
plugins: The
onSuccess,onError, andonSettledglobal hooks have been moved fromPiniaPluginto a Pinia Colada plugin:PiniaColadaQueryHooksPlugin - Breaking
This feature splits up the
statusstate into two different status properties: - Breaking
statusis now just for the data'pending' | 'success' | 'error' - Breaking
queryStatustells if the query is still running or not with'idle' | 'running' - Breaking
refetch,refreshand similar methods now resolve thestateproperty without rejecting. This is usually more convenient. - Breaking
The
QueryStatustype has been split intoDataStateStatusandOperationStateStatus.
Release note
Breaking changes
- Breaking
isFetchingfromuseQuery()is renamed toisLoadingto better reflect that it's connected toasyncStatus. - Breaking
The setup option in useQuery now receives the options
as the second argument instead of a context object with the query return
value and the options. This allows the setup function to have a more
predictable signature and makes it easier to type. OnlyPiniaColada
has this option, it has been removed from useQuery. Overall, the
option still needs more thinking and will probably change in the future
again. - Breaking
plugins: The
onSuccess,onError, andonSettledglobal
hooks have been moved fromPiniaPluginto a Pinia Colada plugin:PiniaColadaQueryHooksPluginapp.use(PiniaColada, { + plugins: [ + PiniaColadaQueryHooksPlugin({ onSuccess() {}, onError() {}, onSettled() {}, + }), + ], }) - Breaking
This feature splits up the
statusstate into two
different status properties: - Breaking
statusis now just for the data'pending' | 'success' | 'error' - Breaking
queryStatustells if the query is still running or not with'idle' | 'running' - Breaking
refetch,refreshand similar methods now resolve
thestateproperty without rejecting. This is usually more convenient. - Breaking
The
QueryStatustype has been split intoDataStateStatusandOperationStateStatus. - Breaking
The cache store is going through a refactor to empower
plugins. This change shouldn't affect end users unless you are
directly using the cache store.
As a result a lot of the actions have been renamed - Breaking
Refetch -> fetch
- Breaking
invalidateEntry -> invalidate
- Breaking
ensureEntry -> ensure
Their arguments have changed as well.
- Breaking
This release removes the deprecated
QueryPlugin. UsePiniaColadainstead.
Features
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.