Function: usePlasma()
Function: usePlasma()
Section titled “Function: usePlasma()”usePlasma<
S,M>():PlasmaClient<S,M>
Defined in: react/src/context.tsx:43
Grab the client from context. Throws in development if the provider is missing so mis-mounting fails loud rather than silently.
Explicit type parameters recover the schema / mutators types the context erases:
const client = usePlasma<typeof schema, typeof mutators>()Type Parameters
Section titled “Type Parameters”S extends Record<string, AnyTable> = Record<string, AnyTable>
M = any
Returns
Section titled “Returns”PlasmaClient<S, M>