Skip to content

Commit

Permalink
fix(react): the update could not be triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
Gggpound committed Jun 4, 2024
1 parent a390684 commit 2925c68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export function App(props: IUniverAppProps) {

const uiPartsService = useDependency(IUIPartsService);

const [updateTrigger, setUpdateTrigger] = useState(false);
const [updateTrigger, setUpdateTrigger] = useState({});

useEffect(() => {
const updateSubscription = uiPartsService.componentRegistered$.subscribe(() => {
setUpdateTrigger((prev) => !prev);
setUpdateTrigger({});
});

return () => {
Expand Down

0 comments on commit 2925c68

Please sign in to comment.