react-native-toastier
Version:
React Native Toast message library for Android and iOS with animated and customizable toast notifications.
11 lines • 335 B
JavaScript
import { useContext } from "react";
import { ToastContext } from "../context/ToastProvider";
const useToast = () => {
const context = useContext(ToastContext);
if (!context) {
throw new Error('useToast must be used within a ToastProvider');
}
return context;
};
export default useToast;
//# sourceMappingURL=useToast.js.map