@tanstack/react-db
Version:
React integration for @tanstack/db
21 lines (20 loc) • 679 B
JavaScript
import { getPreparedLiveQuerySources } from "@tanstack/db";
function getUnboundDescriptorReporter(client, hookName) {
if (client) return void 0;
return (alias) => {
throw new Error(
`[${hookName}] Collection descriptor "${alias}" requires a DbClient when the query is consumed. Wrap this component in <DbProvider client={client}> or use a concrete Collection.`
);
};
}
function getPreparedSources(preparedValue, client, hookName) {
return getPreparedLiveQuerySources(
preparedValue,
getUnboundDescriptorReporter(client, hookName)
);
}
export {
getPreparedSources,
getUnboundDescriptorReporter
};
//# sourceMappingURL=source-id-bindings.js.map