@triplit/react 0.0.15 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +1 -1
- package/dist/use-query.d.ts +3 -3
- package/package.json +3 -2
package/dist/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{useEffect as
|
1
|
+
import{useEffect as y,useState as u}from"react";function d(e,s){let[i,n]=u(void 0),[l,t]=u(!1),r=s.build(),o=JSON.stringify(r);return y(()=>{t(!0);let f=e.subscribe(r,c=>{t(!1),n(c)});return()=>{f()}},[o,e]),{fetchingLocal:l,results:i,error:null}}export{d as useQuery};
|
package/dist/use-query.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { TriplitClient, ClientQuery, toBuilder } from '@triplit/client';
|
2
|
-
export declare function useQuery<
|
1
|
+
import { QueryResults, TriplitClient, ClientQuery, toBuilder } from '@triplit/client';
|
2
|
+
export declare function useQuery<CQ extends ClientQuery<any>>(client: TriplitClient<any>, query: toBuilder<CQ>): {
|
3
3
|
fetchingLocal: boolean;
|
4
|
-
results:
|
4
|
+
results: QueryResults<CQ> | undefined;
|
5
5
|
error: null;
|
6
6
|
};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@triplit/react",
|
3
3
|
"packageManager": "yarn@3.4.1",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.19",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
7
7
|
"type": "module",
|
@@ -9,7 +9,8 @@
|
|
9
9
|
"build": "yarn build:code && yarn build:types",
|
10
10
|
"build:code": "node build.cjs",
|
11
11
|
"build:types": "tsc --noEmit false --emitDeclarationOnly --declaration --baseUrl . --outDir dist",
|
12
|
-
"lint": "tsc"
|
12
|
+
"lint": "tsc",
|
13
|
+
"publish-pkg": "npm publish --access public"
|
13
14
|
},
|
14
15
|
"files": [
|
15
16
|
"/dist"
|