Class: Atom<T>
Type parameters
Name | Type |
---|---|
T | any |
Hierarchy
Synergy
<[T
]>↳
Atom
Constructors
constructor
• new Atom<T
>(defaultValue
, name?
)
Type parameters
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
defaultValue | T |
name? | string |
Overrides
Defined in
Properties
atoms
• Readonly
atoms: AtomTuple
<[T
]>
Inherited from
Defined in
defaultValue
• Readonly
defaultValue: T
id
• Readonly
id: symbol
Defined in
name
• Optional
Readonly
name: string
Methods
combine
▸ combine<R
>(...otherSynergies
): Synergy
<[T
, ...Flatten<R, []>[]]>
Type parameters
Name | Type |
---|---|
R | extends any [] |
Parameters
Name | Type |
---|---|
...otherSynergies | SynergyTuple <R > |
Returns
Synergy
<[T
, ...Flatten<R, []>[]]>
Inherited from
Defined in
createAction
▸ createAction<A
>(handler
): () => (...args
: A
) => Promise
<void
>
Type parameters
Name | Type |
---|---|
A | extends any [] |
Parameters
Name | Type |
---|---|
handler | (...args : A ) => (...drafts : DraftTuple <[T ]>) => void | Promise <void > |
Returns
fn
▸ (): (...args
: A
) => Promise
<void
>
Returns
fn
▸ (...args
): Promise
<void
>
Parameters
Name | Type |
---|---|
...args | A |
Returns
Promise
<void
>
Inherited from
Defined in
createInitialValue
▸ createInitialValue(value
): Object
Parameters
Name | Type |
---|---|
value | T |
Returns
Object
Defined in
createProviderState
▸ createProviderState(initialState?
): Record
<symbol
, AtomContextData
<T
>>
internal
Parameters
Name | Type |
---|---|
initialState? | Record <symbol , any > |
Returns
Record
<symbol
, AtomContextData
<T
>>
Inherited from
Defined in
createSelector
▸ createSelector<R
>(selectorFn
): () => any
Type parameters
Name |
---|
R |
Parameters
Name | Type |
---|---|
selectorFn | (...args : [T ]) => R |
Returns
fn
▸ (): any
Returns
any
Inherited from
Defined in
useSet
▸ useSet(): (...args
: [T
]) => Promise
<void
>
Returns
fn
▸ (...args
): Promise
<void
>
Parameters
Name | Type |
---|---|
...args | [T ] |
Returns
Promise
<void
>
Inherited from
Defined in
useValue
▸ useValue(): any
Returns
any