UNPKG

react-native-web-internals

Version:

React Native for Web

11 lines (10 loc) 387 B
import * as React from "react"; const UNINITIALIZED = typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol() : Object.freeze({}); function useStable(getInitialValue) { const ref = React.useRef(UNINITIALIZED); return ref.current === UNINITIALIZED && (ref.current = getInitialValue()), ref.current; } export { useStable as default }; //# sourceMappingURL=index.js.map