@equinor/fusion-observable
Advanced tools
Comparing version 3.0.2 to 3.0.3
import { useState } from 'react'; | ||
import { useObservableLayoutSubscription } from './useObservableSubscription'; | ||
export const useObservableState = (subject, initial) => { | ||
export function useObservableState(subject, initial) { | ||
initial !== null && initial !== void 0 ? initial : (initial = subject.value); | ||
@@ -8,4 +8,5 @@ const [state, setState] = useState(initial); | ||
return state; | ||
}; | ||
} | ||
; | ||
export default useObservableState; | ||
//# sourceMappingURL=useObservableState.js.map |
import { Observable } from '../types'; | ||
export declare const useObservableState: <S>(subject: Observable<S>, initial?: S | undefined) => S | undefined; | ||
export declare function useObservableState<S>(subject: Observable<S>): S | undefined; | ||
export declare function useObservableState<S>(subject: Observable<S>, initial: S): S; | ||
export default useObservableState; |
{ | ||
"name": "@equinor/fusion-observable", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "WIP", | ||
@@ -82,3 +82,3 @@ "private": false, | ||
}, | ||
"gitHead": "e100691d856a7c6dc3c815a6d462f0ccf8f97f98" | ||
"gitHead": "e5668331df89b0ef6ef6175ea1908d4aeb772544" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137263
681