@equinor/fusion-observable
Version:
5 lines (4 loc) • 372 B
TypeScript
import { FlowSubject } from '../FlowSubject';
import type { Action, Reducer, ReducerWithInitialState } from '../types';
export declare function useObservable<S, A extends Action = Action>(reducer: Reducer<S, A>, initial: S): FlowSubject<S, A>;
export declare function useObservable<S, A extends Action = Action>(reducer: ReducerWithInitialState<S, A>): FlowSubject<S, A>;