Skip to content

Commit 86a9cc0

Browse files
committed
fix: remove hooks dependencies to prevent circular dependencies
1 parent 2d56a07 commit 86a9cc0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

packages/main-layout/src/browser/tabbar/bar.view.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,9 @@ export const IconTabView: React.FC<{ component: ComponentRegistryProvider }> = (
214214
}, [component]);
215215

216216
useEffect(() => {
217-
// Immediately update with current component to handle initial badge value
218-
setComponent({ ...component });
219-
220217
const dispose = component.onChange((newComponent) => {
221-
setComponent(newComponent);
218+
// Immediately update with current component to handle initial badge value
219+
setComponent({ ...newComponent });
222220
});
223221
return () => {
224222
dispose.dispose();

0 commit comments

Comments
 (0)