MoleculeScope
MoleculeScope: <
T> {defaultTuple:ScopeTuple<T>;defaultValue:T;displayName:string; } &Record<symbol,unknown>
A scope that can be used to create scoped molecules.
When a molecule depends on a scope, this it becomes a scoped molecule and the molecule will be called to provide a value once per unique scope value.
Create a MoleculeScope by calling createScope
export const UserScope = createScope("user1")
MoleculeScope.defaultTupledefaultTuple:
ScopeTuple<T>
MoleculeScope.defaultValuedefaultValue:
T
MoleculeScope.displayNamedisplayName?:
string
Type parameters
| Parameter |
|---|
T |