Explorar el Código

Bugfix: Payload added to Add Event Listener.

lfabl hace 2 años
padre
commit
eb26a68a27
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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