UNPKG

@ryo-98/react-api-bridge

Version:
10 lines (9 loc) 296 B
import { useContext } from "react"; const useFinalContextValue = (options, bridgeContext) => { const { contextValue: _outerContextValue } = options || {}; const ownContextValue = useContext(bridgeContext); return _outerContextValue || ownContextValue; }; export { useFinalContextValue };