Skip to content
Bunshi
GitHub

Molecule

Molecule: <T> { displayName: string; } & Record< symbol, unknown >

A molecule object.

This can be used as a reference to create objects by calling useMolecule in one of the frontend integrations.

Create a Molecule by callig molecule

export const RandomNumberMolecule = molecule(()=>Math.random());

Molecule.displayName

displayName?: string

Type parameters

ParameterDescription
Tthe type of object that will be provided by this molecule

Source

src/vanilla/molecule.ts:57