sonner-native
Version:
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
12 lines (11 loc) • 358 B
JavaScript
;
import * as React from 'react';
export const ToastContext = /*#__PURE__*/React.createContext(null);
export const useToastContext = () => {
const context = React.useContext(ToastContext);
if (!context) {
throw new Error('useToastContext must be used within a ToastProvider');
}
return context;
};
//# sourceMappingURL=context.js.map