@instantdb/react
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -55,3 +55,3 @@ "use strict"; | ||
return unsub; | ||
}, [(0, core_1.weakHash)(query)]); | ||
}, [(0, core_1.weakHash)(query), db]); | ||
return state; | ||
@@ -58,0 +58,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { getDB, weakHash, tx, id, init as initCore, getLocalId, transact, coerceQuery, auth } from "@instantdb/core"; | ||
import { getDB, weakHash, tx, id, init as initCore, getLocalId, transact, coerceQuery, auth, } from "@instantdb/core"; | ||
import { useEffect, useState } from "react"; | ||
@@ -46,3 +46,3 @@ /** | ||
return unsub; | ||
}, [weakHash(query)]); | ||
}, [weakHash(query), db]); | ||
return state; | ||
@@ -49,0 +49,0 @@ } |
{ | ||
"name": "@instantdb/react", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Instant DB for React", | ||
@@ -32,4 +32,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@instantdb/core": "0.6.0" | ||
"@instantdb/core": "0.6.1" | ||
} | ||
} |
@@ -18,3 +18,3 @@ import { | ||
AuthState, | ||
User | ||
User, | ||
} from "@instantdb/core"; | ||
@@ -26,4 +26,4 @@ | ||
* | ||
* The first step: init your application! | ||
* | ||
* The first step: init your application! | ||
* | ||
* Visit https://instantdb.com/dash to get your `appId` :) | ||
@@ -40,12 +40,12 @@ * | ||
* Use this to query your data! | ||
* | ||
* | ||
* @see https://docs.instantdb.com/docs/instaql | ||
* | ||
* | ||
* @example | ||
* // listen to all goals | ||
* useQuery({ goals: {} }) | ||
* | ||
* | ||
* // goals where the title is "Get Fit" | ||
* useQuery({ goals: { $: { where: { title: "Get Fit" } } } }) | ||
* | ||
* | ||
* // all goals, _alongside_ their todos | ||
@@ -70,3 +70,3 @@ * useQuery({ goals: { todos: {} } }) | ||
return unsub; | ||
}, [weakHash(query)]); | ||
}, [weakHash(query), db]); | ||
@@ -77,9 +77,9 @@ return state; | ||
/** | ||
* Listen for the logged in state. This is useful | ||
* Listen for the logged in state. This is useful | ||
* for deciding when to show a login screen. | ||
* | ||
* | ||
* Check out the docs for an example `Login` component too! | ||
* | ||
* | ||
* @see https://docs.instantdb.com/docs/auth | ||
* @example | ||
* @example | ||
* function App() { | ||
@@ -98,3 +98,3 @@ * const { isLoading, user, error } = useAuth() | ||
* } | ||
* | ||
* | ||
*/ | ||
@@ -136,2 +136,1 @@ function useAuth(): AuthState { | ||
}; | ||
@@ -17,4 +17,4 @@ { | ||
"allowSyntheticDefaultImports": true, | ||
"allowJs": true | ||
} | ||
"allowJs": true, | ||
}, | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17779
+ Added@instantdb/core@0.6.1(transitive)
- Removed@instantdb/core@0.6.0(transitive)
Updated@instantdb/core@0.6.1