Skip to content

Commit 457d324

Browse files
committed
fix: send all messages and states to redux dev tools
1 parent bb070af commit 457d324

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/useElmish.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ function useElmish<TProps, TModel, TMessage extends Message>({
139139
modified = true;
140140
}
141141

142+
// biome-ignore lint/suspicious/noConsole: <explanation>
143+
console.log("redux currentModel:", { ...initializedModel, ...currentModel });
144+
145+
devTools.current?.send(nextMsg.name, { ...initializedModel, ...currentModel });
146+
142147
nextMsg = buffer.shift();
143148
} while (nextMsg);
144149

@@ -205,11 +210,6 @@ function useElmish<TProps, TModel, TMessage extends Message>({
205210
if (modelHasChanged(currentModel, { ...deferredModel, ...newModel })) {
206211
currentModel = { ...currentModel, ...deferredModel, ...newModel };
207212

208-
// biome-ignore lint/suspicious/noConsole: <explanation>
209-
console.log("redux currentModel:", currentModel);
210-
211-
devTools.current?.send(nextMsg.name, currentModel);
212-
213213
modified = true;
214214
}
215215

0 commit comments

Comments
 (0)