@univerjs/ui v0.5.4


Function: useObservable()

Call Signature

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

Defined in: 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: 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: 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: 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

Call Signature

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

Defined in: submodules/univer/packages/ui/src/components/hooks/observable.ts:36

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableObservableOrFn<T>
defaultValueundefined | T
shouldHaveSyncValue?true

Returns

T

Call Signature

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

Defined in: submodules/univer/packages/ui/src/components/hooks/observable.ts:37

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>
defaultValueT

Returns

T

Call Signature

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

Defined in: submodules/univer/packages/ui/src/components/hooks/observable.ts:38

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>
defaultValue?undefined

Returns

T | undefined

Call Signature

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

Defined in: submodules/univer/packages/ui/src/components/hooks/observable.ts:39

Type Parameters

Type Parameter
T

Parameters

ParameterType
observableNullable<ObservableOrFn<T>>
defaultValueT
shouldHaveSyncValue?boolean
deps?any[]

Returns

T

Call Signature

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

Defined in: submodules/univer/packages/ui/src/components/hooks/observable.ts:40

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: submodules/univer/packages/ui/src/components/hooks/observable.ts:41

Type Parameters

Type Parameter
T

Parameters

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

Returns

T | undefined