@ada-anvil/sdk-enhancer-react
Table of contents
Type Aliases
Functions
Type Aliases
HookName
Ƭ HookName<Name
>: Name
extends string
? `use${Capitalize<Name>}` : Name
Type parameters
ReactEnhancerResult
Ƭ ReactEnhancerResult<Getters
>: { [K in keyof Getters as Getters[K] extends Record<string, object> ? K : Getters[K] extends Subscribable<object> ? K : never]: Getters[K] extends Record<string, object> ? ReactEnhancerResult<Getters[K]> : Getters[K] extends Subscribable<object> ? ServiceHooks<Getters[K]> : never }
Type parameters
ServiceHooks
Ƭ ServiceHooks<S
>: { [K in keyof S["_subscribableValues"] as HookName<K>]: Function }
Type parameters
Name | Type |
---|
S | extends Subscribable <object > |
Functions
reactEnhancer
▸ reactEnhancer<Getters
>(getters
): Object
Type parameters
Name | Type |
---|
Getters | extends object |
Parameters
Returns
Object
useSubscribable
▸ useSubscribable<V
, K
>(s
, k
): V
[K
]
Type parameters
Name | Type |
---|
V | extends object |
K | extends string | number | symbol |
Parameters
Name | Type |
---|
s | Subscribable <V > |
k | K |
Returns
V
[K
]
useSubscription
▸ useSubscription<V
, K
>(s
, k
, handler
): void
Type parameters
Name | Type |
---|
V | extends object |
K | extends string | number | symbol |
Parameters
Name | Type |
---|
s | Subscribable <V > |
k | K |
handler | (v : V [K ]) => void |
Returns
void