Kaynağa Gözat

Bugfix: Payload added to Add Event Listener.

lfabl 2 yıl önce
ebeveyn
işleme
eb26a68a27
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/core/index.tsx

+ 1 - 1
src/core/index.tsx

@@ -59,7 +59,7 @@ class NCoreContext<T extends {} | undefined, K extends ConfigType<T>> {
     };
 
     // event listeners:
-    addEventListener = (key: string, func: (state: T) => void) => {
+    addEventListener = (key: string, func: (payload: any, state: T) => void) => {
         this.subscribers.push({
             func,
             key