You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constupdaters=Array.isArray(result) ? result : [result];
41
-
42
-
updateState(store,event.type, ...updaters);
43
-
}),
44
-
),
45
-
),
46
-
),
47
31
withHooks((store)=>({
48
32
onInit(){
49
33
if(!(DEVTOOL_FEATURE_NAMESinstore)){
@@ -60,6 +44,23 @@ export function withTrackedReducer<State extends object>(
60
44
`In order to use withTrackedReducer, you must first enable the glitch tracking devtools feature via withDevtools('[your store name]', withGlitchTracking())`,
61
45
);
62
46
}
47
+
48
+
constevents=getReducerEvents();
49
+
constupdates=caseReducers.map((caseReducer)=>
50
+
events.on(...caseReducer.events).pipe(
51
+
tap((event)=>{
52
+
conststate=untracked(()=>getState(store));
53
+
constresult=caseReducer.reducer(event,state);
54
+
constupdaters=Array.isArray(result) ? result : [result];
0 commit comments