@univerjscorefunctionsUseobservable

@univerjs/core v0.5.4


Function: useObservable()

Call Signature

function useObservable<T>(observable): T | undefined

Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@wendellhu+redi@0.17.0/node_modules/@wendellhu/redi/esm/react-bindings/reactRx.d.ts:18

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>

Returns

T | undefined

Call Signature

function useObservable<T>(observable, defaultValue): T

Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@wendellhu+redi@0.17.0/node_modules/@wendellhu/redi/esm/react-bindings/reactRx.d.ts:19

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>
defaultValueT

Returns

T

Call Signature

function useObservable<T>(
   observable, 
   defaultValue, 
   shouldHaveSyncValue, 
   deps?): T

Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@wendellhu+redi@0.17.0/node_modules/@wendellhu/redi/esm/react-bindings/reactRx.d.ts:20

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>
defaultValueundefined
shouldHaveSyncValuetrue
deps?any[]

Returns

T

Call Signature

function useObservable<T>(
   observable, 
   defaultValue?, 
   shouldHaveSyncValue?, 
   deps?): T | undefined

Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@wendellhu+redi@0.17.0/node_modules/@wendellhu/redi/esm/react-bindings/reactRx.d.ts:21

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>
defaultValue?undefined
shouldHaveSyncValue?true
deps?any[]

Returns

T | undefined