jazz-react

Context & Hooks

function
JazzProvider<Acc>(__namedParameters):
{}
Element
function fn(...args: [
JazzProviderProps<Acc>
]) {}

Media

function
useProgressiveImg({ image, maxWidth?, targetWidth? }):
{}
{ src: undefined | string, res: "placeholder" | TODO type templateLiteral | undefined, originalSize: co<[number, number]> | undefined }
function fn(...args: [
{ image: ImageDefinition | null | undefined, maxWidth: number, targetWidth: number }
]) {}
function
ProgressiveImg({ children, image, maxWidth?, targetWidth? }):
{}
ReactNode
function fn(...args: [
{ children: (result: { src: undefined | string, res: "placeholder" | TODO type templateLiteral | undefined, originalSize: TODO type typeOperator | undefined }) => ReactNode, image: ImageDefinition | null | undefined, maxWidth: number, targetWidth: number }
]) {}

Auth Providers

function
usePasskeyAuth({ appName, appHostname? }):
{}
{ state: "anonymous" | "signedIn", logIn: () => Promise<void>, signUp: (username: string) => Promise<void> }
function fn(...args: [
{ appName: string, appHostname: string }
]) {}
function
useDemoAuth():
{}
{ state: "anonymous" | "signedIn", logIn: (username: string) => Promise<void>, signUp: (username: string) => Promise<void>, existingUsers: string[] }
function
usePassphraseAuth({ wordlist }):
{}
{ state: "anonymous" | "signedIn", logIn: (passphrase: string) => Promise<void>, signUp: (name: string) => Promise<string>, registerNewAccount: (passphrase: string, name: string) => Promise<ID<Account>>, generateRandomPassphrase: () => string, passphrase: string }
function fn(...args: [
{ wordlist: string[] }
]) {}

Invite Links

Other

type JazzProviderProps

type JazzProviderProps<Acc extends Account> = { children: React.ReactNode } & JazzContextManagerProps<Acc>

⚠️ undocumented
function
useAccount<A>():
{}
{ me: A, logOut: () => void }
function
useAccount<A, R>(options):
{}
{ me: Resolved<A, R> | null | undefined, logOut: () => void }
function fn(...args: [
options: { resolve: RefsToResolveStrict<A, R> }
]) {}
function
useAccountOrGuest<A>():
{}
{ me: A | AnonymousJazzAgent }
function
useAccountOrGuest<A, R>(options):
{}
{ me: Resolved<A, R> | AnonymousJazzAgent | null | undefined }
function fn(...args: [
options: { resolve: RefsToResolveStrict<A, R> }
]) {}
function
useCoState<V, R>(Schema, id, options):
{}
Resolved<V, R> | null | undefined
function fn(...args: [
Schema: CoValueClass<V>,
id: ID<CoValue> | undefined,
options: { resolve: RefsToResolveStrict<V, R> }
]) {}
function
useAcceptInvite<V>({ invitedObjectSchema, onAccept, forValueHint? }):
{}
void
function fn(...args: [
{ invitedObjectSchema: CoValueClass<V>, onAccept: (projectID: ID<V>) => void, forValueHint: string }
]) {}
function
experimental_useInboxSender<I, O>(inboxOwnerID):
{}
(message: I) => Promise<TODO type conditional>
function fn(...args: [
inboxOwnerID: ID<Account> | undefined
]) {}
function
useJazzContext<Acc>():
{}
JazzContextType<Acc>
function
useAuthSecretStorage():
{}
AuthSecretStorage
function
DemoAuthBasicUI(props):
{}
Element | Iterable<ReactNode, any, any> | null | string | number | boolean
function fn(...args: [
props: { appName: string, children: ReactNode }
]) {}
function
PasskeyAuthBasicUI(props):
{}
Element | Iterable<ReactNode, any, any> | null | string | number | boolean
function fn(...args: [
props: { appName: string, appHostname: string, children: ReactNode }
]) {}
function
PassphraseAuthBasicUI(props):
{}
Element | Iterable<ReactNode, any, any> | null | string | number | boolean
function fn(...args: [
props: { appName: string, wordlist: string[], children: ReactNode }
]) {}
function
useIsAuthenticated():
{}
boolean

Image creation

function
createImage(imageBlobOrFile, options):
{}
Promise<ImageDefinition>
function fn(...args: [
imageBlobOrFile: File | Blob,
options: { owner: Group | Account, maxSize: 2048 | 1024 | 256 }
]) {}