@instantdb/react
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -1,2 +0,2 @@ | ||
import { instatx, Config, transact as transactCore } from "@instantdb/core"; | ||
import { instatx, getLocalId as getLocalIdCore, Config, transact as transactCore } from "@instantdb/core"; | ||
export declare function init(config: Config): any; | ||
@@ -18,7 +18,8 @@ type QueryState<T> = { | ||
}; | ||
export declare function useQuery<T = any>(query: any): QueryState<T>; | ||
export declare function useQuery<T = any>(_query: any): QueryState<T>; | ||
export declare const id: (<T extends ArrayLike<number>>(options: import("uuid").V4Options, buffer: T, offset?: number) => T) & ((options?: import("uuid").V4Options) => string); | ||
export declare const tx: instatx.EmptyChunk; | ||
export declare const transact: typeof transactCore; | ||
export declare const getLocalId: typeof getLocalIdCore; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transact = exports.tx = exports.id = exports.useQuery = exports.init = void 0; | ||
exports.getLocalId = exports.transact = exports.tx = exports.id = exports.useQuery = exports.init = void 0; | ||
const core_1 = require("@instantdb/core"); | ||
@@ -10,3 +10,4 @@ const react_1 = require("react"); | ||
exports.init = init; | ||
function useQuery(query) { | ||
function useQuery(_query) { | ||
const query = (0, core_1.coerceQuery)(_query); | ||
const db = (0, core_1.getDB)(); | ||
@@ -33,2 +34,3 @@ // (XXX): Don't set `isLoading` true if we already have data, would | ||
exports.transact = core_1.transact; | ||
exports.getLocalId = core_1.getLocalId; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { instatx, Config, transact as transactCore } from "@instantdb/core"; | ||
import { instatx, getLocalId as getLocalIdCore, Config, transact as transactCore } from "@instantdb/core"; | ||
export declare function init(config: Config): any; | ||
@@ -18,7 +18,8 @@ type QueryState<T> = { | ||
}; | ||
export declare function useQuery<T = any>(query: any): QueryState<T>; | ||
export declare function useQuery<T = any>(_query: any): QueryState<T>; | ||
export declare const id: (<T extends ArrayLike<number>>(options: import("uuid").V4Options, buffer: T, offset?: number) => T) & ((options?: import("uuid").V4Options) => string); | ||
export declare const tx: instatx.EmptyChunk; | ||
export declare const transact: typeof transactCore; | ||
export declare const getLocalId: typeof getLocalIdCore; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { getDB, weakHash, instatx, uuid, init as initCore, transact as transactCore, } from "@instantdb/core"; | ||
import { getDB, weakHash, instatx, uuid, init as initCore, getLocalId as getLocalIdCore, transact as transactCore, coerceQuery, } from "@instantdb/core"; | ||
import { useEffect, useState } from "react"; | ||
@@ -6,3 +6,4 @@ export function init(config) { | ||
} | ||
export function useQuery(query) { | ||
export function useQuery(_query) { | ||
const query = coerceQuery(_query); | ||
const db = getDB(); | ||
@@ -28,2 +29,3 @@ // (XXX): Don't set `isLoading` true if we already have data, would | ||
export const transact = transactCore; | ||
export const getLocalId = getLocalIdCore; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@instantdb/react", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Instant DB for React", | ||
@@ -31,4 +31,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@instantdb/core": "0.4.1" | ||
"@instantdb/core": "0.4.2" | ||
} | ||
} |
@@ -7,4 +7,6 @@ import { | ||
init as initCore, | ||
getLocalId as getLocalIdCore, | ||
Config, | ||
transact as transactCore, | ||
coerceQuery, | ||
} from "@instantdb/core"; | ||
@@ -23,3 +25,4 @@ | ||
export function useQuery<T = any>(query: any): QueryState<T> { | ||
export function useQuery<T = any>(_query: any): QueryState<T> { | ||
const query = coerceQuery(_query); | ||
const db = getDB(); | ||
@@ -47,1 +50,2 @@ // (XXX): Don't set `isLoading` true if we already have data, would | ||
export const transact = transactCore; | ||
export const getLocalId = getLocalIdCore; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10614
175
+ Added@instantdb/core@0.4.2(transitive)
- Removed@instantdb/core@0.4.1(transitive)
Updated@instantdb/core@0.4.2