react-native-toastier
Version:
React Native Toast message library for Android and iOS with animated and customizable toast notifications.
17 lines (16 loc) • 482 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _ToastProvider = require("../context/ToastProvider");
const useToast = () => {
const context = (0, _react.useContext)(_ToastProvider.ToastContext);
if (!context) {
throw new Error('useToast must be used within a ToastProvider');
}
return context;
};
var _default = exports.default = useToast;
//# sourceMappingURL=useToast.js.map