UNPKG

react-native-wishlist

Version:
18 lines (17 loc) 549 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WishlistContext = void 0; exports.useWishlistContext = useWishlistContext; var _react = require("react"); const WishlistContext = /*#__PURE__*/(0, _react.createContext)(null); exports.WishlistContext = WishlistContext; function useWishlistContext() { const context = (0, _react.useContext)(WishlistContext); if (!context) { throw Error('Must be rendered inside a Template component.'); } return context; } //# sourceMappingURL=WishlistContext.js.map