Skip to content

Commit fa6003d

Browse files
committed
fix: api state reflect
1 parent 5f3c183 commit fa6003d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.changeset/dirty-otters-camp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ensembleui/react-framework": patch
3+
---
4+
5+
fix api state reflact issue

packages/framework/src/hooks/useScreenData.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useAtom, useAtomValue } from "jotai";
2-
import { clone } from "lodash-es";
32
import { useCallback, useMemo } from "react";
43
import isEqual from "react-fast-compare";
54
import type { Response, WebSocketConnection } from "../data";
@@ -49,7 +48,7 @@ export const useScreenData = (): {
4948
return;
5049
}
5150
data[name] = response;
52-
setDataAtom(clone(data));
51+
setDataAtom({ [name]: response });
5352
},
5453
[data, setDataAtom],
5554
);

0 commit comments

Comments
 (0)