MCPcopy Create free account
hub / github.com/esengine/esengine / useToast

Function useToast

packages/editor-app/src/components/Toast.tsx:21–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19const ToastContext = createContext<ToastContextValue | null>(null);
20
21export const useToast = () => {
22 const context = useContext(ToastContext);
23 if (!context) {
24 throw new Error('useToast must be used within ToastProvider');
25 }
26 return context;
27};
28
29interface ToastProviderProps {
30 children: ReactNode;

Callers 1

AppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected