Loading...
Loading...
Use this skill when building, debugging, or optimizing Jazz applications. It covers Jazz's bindings with various different UI frameworks, as well as how to use Jazz without a framework. Look here for details on providers and context, hooks and reactive data fetching, authentication, and specialized UI components for media and inspection.
npx skill4agent add garden-co/jazz jazz-ui-developmentjazz-schema-designjazz-permissions-securityjazz-testing$isLoadedbooleantrue.toJSON().$jazz.$jazz.$jazz.idID<CoValue>co_zXy....$jazz.ownerGroup.$jazz.createdAtnumber.$jazz.createdByID<Account> | undefined.$jazz.lastUpdatedAtnumber.$jazz.loadingState"loading" | "loaded" | "unavailable" | "unauthorized".$jazz.ensureLoaded({ resolve: { ... } })const detailedPost = await post.$jazz.ensureLoaded({
resolve: {
comments: {
$each: {
author: true
}
}
}
});.$jazz.refs.$jazz.has(key).$jazz.subscribe(callback)useCoState.$jazz.waitForSync().$jazz.isBranchedboolean.$jazz.branchNamestring.$jazz.unstable_merge()user.name.$jazz.set(key, value).$jazz.delete(key).$jazz.applyDiff(diff)list[0]mapforEach.$jazz.push(item).$jazz.unshift(item).$jazz.splice(...).$jazz.remove(index or predicate)toString()insertAfter(index, text)deleteRange({ from, to }).$jazz.applyDiff(newText)feed.all.$jazz.push(item)// Subscribing to all entries across all accounts
const allEntries = Object.values(feed.perAccount).flatMap(accountFeed => Array.from(accountFeed.all));
// Pushing a new entry
feed.$jazz.push({ message: "Hello", timestamp: Date.now() });typeconst list = co.list(MyUnion);
const item = list[0];
if (item.type === "text") {
console.log(item.value); // item is narrowed to TextVariant
} else if (item.type === "image") {
console.log(item.image.$jazz.id); // item is narrowed to ImageVariant
}toBlob()createFromBlob(blobOrFile)start(metadata) -> push(chunk) -> end()<Image>loadImageBySizecreateImagejazz-tools/media<Image imageId={productImage.$jazz.id} width={300} />$isLoadedif (coValue.$isLoaded)resolveuseCoState(..., { resolve: { items: true } })<JazzProvider />selectuseCoStateuseMemoselectequalityFn.$jazz.set().$jazz.push()obj.key = val