Browse Source

Bugfix: Payload added to Add Event Listener.

lfabl 2 năm trước cách đây
mục cha
commit
eb26a68a27
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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