@nanostores/query
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -47,3 +47,5 @@ import { MapStore, ReadableAtom } from "nanostores"; | ||
error?: E; | ||
}>; | ||
}> & { | ||
mutate: MutateCb<Data>; | ||
}; | ||
export declare const nanoquery: ({ cache, fetcher, ...globalSettings }?: NanoqueryArgs) => readonly [<T = unknown, E = any>(keyInput: KeyInput, { fetcher, ...fetcherSettings }?: CommonSettings<T>) => FetcherStore<T, E>, <Data = void, Result = unknown, E_1 = any>(mutator: ManualMutator<Data, Result>) => MutatorStore<Data, Result, E_1>, { | ||
@@ -50,0 +52,0 @@ readonly __unsafeOverruleSettings: (data: CommonSettings) => void; |
@@ -237,2 +237,3 @@ import { map, onStart, onStop, atom } from "nanostores"; | ||
}); | ||
store.mutate = mutate; | ||
return store; | ||
@@ -239,0 +240,0 @@ } |
{ | ||
"name": "@nanostores/query", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Tiny remote data fetching library for Nano Stores", | ||
"scripts": { | ||
"prepublish": "pnpm build", | ||
"build": "vite build", | ||
@@ -7,0 +8,0 @@ "check": "tsc --noEmit && vitest typecheck --run", |
@@ -126,5 +126,3 @@ # Nano Stores Query | ||
Mutator basically allows for 2 main things: tell nanoquery **what data should be | ||
revalidated** and **optimistically change data**. From interface point of view it's | ||
essentially a wrapper around your async function with some added functions. | ||
Mutator basically allows for 2 main things: tell nanoquery **what data should be revalidated** and **optimistically change data**. From interface point of view it's essentially a wrapper around your async function with some added functions. | ||
@@ -175,2 +173,4 @@ It gets an object with 3 arguments: | ||
You can also access the mutator function via `$addComment.mutate`—the function is the same. | ||
## _Third returned item_ | ||
@@ -177,0 +177,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34201
669